forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not assign currentTime of video unless MetaData is available.
Fixes shaka-project#101 Required for Firefox's and IE's MediaElement implementations.
- Loading branch information
Nick Desaulniers
committed
Jun 18, 2015
1 parent
96b369e
commit f061c81
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the case of live streaming, this would not be enough. If the readyState is HAVE_NOTHING and we skip setting currentTime completely, live streams will not start properly. Their streamStartTimes are generally greater than 0. If the live stream has been running longer than its timeShiftBufferDepth parameter, starting at 0 is not possible (the segments are not available). Some live streams actually never had a segment at time 0 if they use offset since 1970 in the encoder.
So if the readyState is wrong, you will have to defer setting currentTime until the readyState is at least HAVE_METADATA, not skip it completely.