What is the key to "unbuffered seek" on Chrome ?

108 views
Skip to first unread message

Xiaoming Ding

unread,
Aug 8, 2017, 12:55:49 PM8/8/17
to Shaka Player Users
I am reading the source code of shaka and try to understand how to make Chrome decode/play the downloaded segments when unbeffered seek happens.

I clip the playhead faraway for an unbuffered seek and Chrome can fetch the needed segments and start from the new playback position.    
So the steps I summarized : 
1. remove the source buffer .
2. feed the previous reference ( SegmentReference ) in case of drift, and the following segments .


But when I repeat the above steps in my own javascript without shaka and  the first step is replaced with feeding the init. segment ( mp4  file instead of webm . The reason is : my chrome start with a new webpage and no seek  at all --- I would like to make Chrome start with the n-th segment directly  . Of course , these segments are the same as the ones played with shaka's unbuffered seek.)  The chrome does not play them at all .


Is there some important step I missed ?

Regards !


Xiaoming Ding


  

Joey Parrish

unread,
Aug 10, 2017, 2:54:43 PM8/10/17
to Shaka Player Users
Hi Xiaoming,

When Shaka detects that a seek is into an unbuffered region, we remove everything from the buffer.  We do not remove the SourceBuffer itself, so we can't offer any advice on this approach.  Did you mean remove() on SourceBuffer?

After you start appending content to the SourceBuffer, if video.currentTime is not in a buffered range, you will have to set video.currentTime to seek into the now-buffered content.  Otherwise, the media pipeline will stall until there is content at currentTime.

Does this help?
-Joey


--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/bc28adf0-32ce-4366-8960-4365a2fb54ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages