2011-11-16 58 views
1

我無法讓我的播放器自動啓動或控件自動隱藏。我相信我已經正確設置了這一點,但它不起作用。這裏是我的整個腳本標籤此:Flowplayer控件:自動隱藏和自動播放

<script type="text/javascript"> 
    // wait for the DOM to load using jQuery 
    $(function() { 

     // setup player normally 
     $f("videoPlayer", "videos/flowplayer-3.2.7.swf", { 

      // clip properties common to all playlist entries 
      clip: { 
       autoPlay: false, 
       autoBuffering: true, 
       baseUrl: 'http://thepartysource.com/videos/', 
       subTitle: '', 
       time: '' 
      }, 

      // our playlist 
      playlist: [ 
       { 
        url: 'DRINK DIFFERENTLY - 480x272.m4v', 
        autoPlay: true 
       }, 
       { 
        url: 'DRINK DIFFERENTLY - 480x272.m4v' 
       } 
      ], 

      // show playlist buttons in controlbar 
      plugins: { 
       controls: { 
        playlist: true, 

        // display properties such as size, location and opacity 
        top: 20, 
        left: 0, 
        bottom: 0, 
        opacity: 0.95, 

        // styling properties (will be applied to all plugins) 
        background: '#000', // url(/my/custom/controls.png) no-repeat 3px 6px', 
        backgroundGradient: 'low', 

        // controlbar specific settings 
        timeColor: '#980118', 
        all: false, 
        play: false, 
        scrubber: true, 
        fullscreen: true, 

        // tooltips (since 3.1) 
        tooltips: { 
         buttons: false, 
         //fullscreen: 'Enter fullscreen mode' 
        }, 

        autoHide: { 
         enabled: true, 

         // always enable 
         fullsccreenOnly: false, 

         // make it hide faster 
         hideDelay: 1000, 

         mouseOutDelay: 500 
        } 
       } 
      } 
     }); 

     /* 
      here comes the magic plugin. It uses first div.clips element as the 
      root for as playlist entries. loop parameter makes clips play 
      from the beginning to the end. 
     */ 
     $f("videoPlayer").playlist("div.clips:first", {loop:true}); 
    }); 

</script> 

下面是HTML區域:

<div class="box-movie"> 
    <!-- the player using splash image --> 
    <a class="player plain" id="videoPlayer"> 
     <img src="images/play_text_large.png" /> 
    </a> 

    <div class="clips" style="margin-top:15px;"> 
     <!-- single playlist entry as an "template" --> 
     <a href="${url}">&nbsp; 
      <!--${title}--> <!--<span>${subTitle}</span>--> 
      <!--<em>${time}</em>--> 
     </a> 
    </div> 

    <!-- let rest of the page float normally --> 
    <br clear="all"/> 
</div> 

編輯

我居然發現什麼問題可能是。當它加載時,它幾乎只是一個飛濺的圖像,而不是真正的玩家。你可以在http://thepartysource.com/index_test.php查看。如果我將第二個剪輯設置爲自動播放,則會在第一個完成後執行。

回答

0

我不得不把div.clips標籤更改爲:

<!-- the player using splash image --> 
<a href="videos/flowplayer-3.2.7.swf" class="player plain" id="videoPlayer"> 
</a> 

指定HREF到的Flowplayer下手。這會讓玩家在頁面加載時加載,並且autoPlay開始工作。