mangui / flashls

HLS Flash Plugin/Player (Chromeless,OSMF,FlowPlayer,mediaelement.js,video.js,Clappr)
http://www.flashls.org
Mozilla Public License 2.0
751 stars 264 forks source link

Live seek DVR #376

Open lemonwhale opened 9 years ago

lemonwhale commented 9 years ago

Hello

Thanks for your excellent work. I can play a live stream and vod stream without any problems, but I cant figure out how to seek backwards into a live stream. We use a wowza server and have verified the DVR live setup with another videoplayer, but How do I do it in the player for flashls? Is it a query-param in the m3u8 stream (like ...m3u8?DVR&starttime=xxxxx) or do I use hls.seek(xxxx) with an UTC time or something else?

Keep up the great work

mangui commented 9 years ago

a live playlist is seekable in the following range : from t=0s (first fragment in the playlist) to t=playlist duration - 3 fragment. (https://github.com/mangui/flashls/blob/dev/src/org/mangui/hls/stream/StreamBuffer.as#L111-L115)

if you want to seek 60s backward you can do hls.stream.seek(hls.position-60) providing that hls.position-60 is greater than 0