要求

2013-04-15 37 views
1

我使用NetStream類播放視頻使用視頻類或舞臺視頻,沒有搜索欄,以向前或向後的視頻,我添加了搜索欄,以視頻,但求功能不準確地工作,這給我一個錯誤的尋求時間。 ns.seek(mySeekTime) 我想知道是否有可能使我自己的尋求酒吧與精確搜索,我從服務器獲取視頻,服務器影響尋求視頻?要求

 private function onClick(event:MouseEvent):void 
     { 
      if (event.currentTarget is Group) 
      { 
       var myGroup:Group = event.currentTarget as Group; 
       if (myGroup.mouseX >= 100) 
        { 
        mouseClickedXPos = myGroup.mouseX; 
        ns.inBufferSeek = true; 
        var seekTime:Number = (mouseClickedXPos-100) * (totalTime/(controlBarControls.width-100)); 
        ns.seek(seekTime);  
        myRect.graphics.clear(); 
        myRect.graphics.beginFill(0xFF0000); 
        myRect.graphics.drawRect(controlBarControls.x+100,controlBarControls.y,mouseClickedXPos-100, rect.height); 
       } 
      } 
     } 

這裏搜索欄是myRect形狀我Event.ENTER_FRAME後繪製。

的問題:時間ns.time()不會改變新的時候,我們通過尋求(seekTime)更新

+0

如果您發佈了代碼以及您遇到的具體問題,您將獲得更多回復。 –

+0

@CoryKendall:已更新 –

回答

0

你嘗試到關鍵幀添加到視頻前。 Adobe媒體編碼器?看起來seek函數使用關鍵幀來定位時間。

+0

NetStream只能尋找關鍵幀。如果每六秒鐘有一個關鍵幀,然後再尋找時間10,則該視頻最終將在時間6播放。 – Nathan