Adobe Flash Builder: How to make a function to play video starting from one second and ending in another? So I havein MXML simple video player tag. I need some function to play that video from second X to second Y and pause it. How to do such thing?
BTW: we asume file is开发者_如何学运维 embeded into SWF.
using FMS? not using FMS? With FMS you would pass in netstream.play(file, start, duration); If not using FMS, the conventional method (which is pretty awful) is to do something similar to:
stream.play(file);
stream.pause();
// wait for the time to be available, and then play
stream.seek(start);
stream.resume();
// listen for the end and then
stop();
If you have access to change your webserver, there are better plugins to handle on-demand seeking, take a look at:
Apache mod_flvx: http://journal.paul.querna.org/articles/2006/07/11/mod_flvx/ Nginx h264 module: http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Nginx-Version2
or just google mod h264 and/or mod flv and your web server
精彩评论