如果加載了在Flash或的VideoDisplay Flex中FLVPlayback組件,並試圖尋求到一個特定的位置或者設置playheadTime到特定位置,電影總是或非常大量的尋找播放頭到Flash視頻中的特定位置?
在Flash中,將輪上下一個FLVPlayback組件將舞臺和源設置爲http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv 然後嘗試video.seek(6)或video.playheadTime = 6;
如果你使用其內置的洗滌它只是將後藤10.同樣,僅間隔爲0,5或10因此頂多看到擦洗框架是3
下面是柔性用一個例子相同的結果。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:media="com.synapsegroup.media.*">
<mx:Script>
<![CDATA[
import mx.events.MetadataEvent;
import mx.events.SliderEvent;
import mx.events.VideoEvent;
protected function scrubber_changeHandler(event:SliderEvent):void
{
trace(event.value);
video.playheadTime = event.value;
}
protected function video_playheadUpdateHandler(event:mx.events.VideoEvent):void
{
//scrubber.value = event.playheadTime;
//http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv
}
]]>
</mx:Script>
<mx:Panel>
<mx:VideoDisplay id="video" source="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv" minWidth="200" minHeight="200"
autoPlay="false"
/>
<mx:ControlBar>
<mx:Button label="Play" click="video.play();"/>
<mx:Button label="Stop" click="video.pause();"/>
<mx:HSlider liveDragging="true" id="scrubber" minimum="0" maximum="11.5" change="scrubber_changeHandler(event)" thumbPress="video.pause();"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>
在這兩種情況下,如果你點擊播放/暫停速度不夠快,你可以對個別幀暫停與更多的粒度,但那不是一個好UX
有我丟失的東西以編程方式做到這一點?
我也想說的是,根據視頻的長度,這在過去是3分鐘長期得到10秒的時間間隔
感謝您的洞察力 – chrisan 2011-12-22 18:07:42