OSMF with HTTP stream seeking is resetting start index...
hi,
i have built osmf player allows users seek when resuming, scrub beginning.
eg:
a stream 1 minute long.
user starts play @ 25 seconds.
user can scrub 5 seconds or forward 55 seconds.
this works rtmp - timetrait reports correctly , video displays correctly.
eg:
start @ 25 seconds, timetrait reports: duration = 60, current position = 25 , displaying video 25.
seek 5 seconds rewinds current duration = 60, position = 5, displaying video 5.
but...
with http streams...
start @ 25 seconds. timetrait reports: duration = 60, current position = 25 , displaying video 50.
seek 5 seconds rewinds before start of stream , gives me media complete... end of stream.
start @ 30 seconds, timetrait reports duration = 60, current position = 30 , displaying video 60 so gives me media complete... end of stream.
it pretty clear happening http stream seeking resetting start index seek point, if had started play with:
netstream.play(seekpoint);
rather than:
netstream.play();
netstream.seek(seekpoint);
this, hasten add, horrendous issue client's point of view means cannot allow resume of content.
does have ideas, workarounds?
g
after digging osmf code i've found solution:
first, ensure have latest osmf source inside project.
for it's 2.0.71 (org.osmf.utils.version).
navigate org.osmf.net.httpstreaming.httpnetstream
and make changes:
1. change line # 1441
_initialtime = _dvrinfo != null ? _dvrinfo.starttime : currenttime;
to
_initialtime = _dvrinfo != null ? _dvrinfo.starttime : (_seektime > 0 ? _playstart : currenttime);
2. change line # 1496
_initialtime = currenttime
to
_initialtime = _seektime > 0 ? _playstart : currenttime
that's it!
now can listen mediaplayercapabilitychangeevent.can_seek_change event
and seek immediately.
by way: if you'll find bugs related change feel free post them here!
More discussions in Adobe Media Server
adobe
Comments
Post a Comment