Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Implement seekable #295

Merged
merged 5 commits into from
Jun 5, 2015
Merged

Implement seekable #295

merged 5 commits into from
Jun 5, 2015

Conversation

dmlap
Copy link
Member

@dmlap dmlap commented Jun 2, 2015

Override the Flash tech's seekable method to take into account live playlists.

Override the Flash tech's seekable method to take into account live playlists.
@dmlap
Copy link
Member Author

dmlap commented Jun 2, 2015

This is dependent on videojs/video.js@1c35bfa

return videojs.createTimeRange();
}
// when the playlist is complete, the entire duration is seekable
if (playlist.endList) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could it be that you get an endList in a sliding window manifest? In which case, the start range shouldn't be zero.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or would this only come up in the DVR/VOD case only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endList is the signal that the playlist is complete and there will be no further updates, i.e. it's now a VOD playlist.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we know that a sliding window has ended, assuming it isn't turning into a VOD playlist?

@gkatsev
Copy link
Member

gkatsev commented Jun 2, 2015

Otherwise, LGTM

dmlap added 4 commits June 4, 2015 21:21
Keep track of the accurate durations of expired segments in the playlist loader so that it's possible to accurately calculate the start and end points of the seekable ranges relative to media timeline position zero, even if we switch variant streams or seek within a live stream. Track the media timeline position of the last discontinuity to allow for PTS-based variant stream synchronization instead of the incorrect media sequence based method we're currently using. Stop rewriting timestamps in the transmuxed FLV tags for that reason as well. Add m3u8 parser support for EXT-X-DISCONTINUITY-SEQUENCE.
Previously, in-band metadata cues were added whenever they were encountered during the segment parsing process. If you seeked in a stream, this would cause the same cues to be added multiple times when its containing segment was re-buffered. Now, cues that occur after current time are cleared on every seek which allows them to be re-added without duplication after they're re-parsed. Cues before the current time are retained because re-buffering would not cause them to be recreated. Adjust cue point creation to take live stream segment expiration into account.
If the segment parser timestamp offset isn't at the start of the last encountered discontinuity, it was impossible to recover the associated media time. Track the media time alongside the timestamp offset so that when a stream is first loaded and the last discontinuity segment start is unavailable, it's still possible to properly translate timestamps. Also, make sure that cue points ahead of current time are cleaned out of the in-band metadata track on seeking. We previously assumed they were ordered by start time but that doesn't seem to be the case for Chrome on OS X. Use the dev version of video.js because of Google Closure compiler gobbling some part of the requiremed machinery for removing cues.
Two tools used to inject TXXX frames terminate the value field with a null byte. Make sure that isn't included in the parsed representation.
@forbesjo
Copy link
Contributor

forbesjo commented Jun 5, 2015

LGTM

dmlap added a commit to dmlap/videojs-contrib-hls that referenced this pull request Jun 5, 2015
@dmlap dmlap merged commit e1e725c into videojs:master Jun 5, 2015
@dmlap dmlap deleted the seekable branch June 5, 2015 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants