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

Seek to a safe position when resuming live playlists #327

Merged
merged 2 commits into from
Jun 26, 2015

Conversation

dmlap
Copy link
Member

@dmlap dmlap commented Jun 25, 2015

If the player has fallen out of the live window, seek back to the earliest safe position when playback resumes. If the player is paused too far ahead of the live point, seek back to the latest safe position when resuming. Fixes #318 and #319.

dmlap added 2 commits June 25, 2015 14:30
If the player has fallen out of the live window, seek back to the earliest safe position when playback resumes. If the player is paused too far ahead of the live point, seek back to the latest safe position when resuming.
If currentTime is called with a value outside the current seekable range, seek to the closest valid playback position instead.

} else if (this.currentTime() < this.seekable().start(0)) {
// if the viewer has paused and we fell out of the live window,
// seek forward to the earliest available position
Copy link
Member

Choose a reason for hiding this comment

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

in this case, do we want to seek to the earliest position or to the "3 segments behind live"/"live point" position?

Copy link
Member Author

Choose a reason for hiding this comment

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

This way the viewer misses the minimum amount of content relative to when they paused the broadcast. The choice is a bit subjective but I think this is defensible.

@dmlap
Copy link
Member Author

dmlap commented Jun 26, 2015

Offline approval from @gkatsev

dmlap added a commit to dmlap/videojs-contrib-hls that referenced this pull request Jun 26, 2015
@dmlap dmlap merged commit 1a0671b into videojs:master Jun 26, 2015
@dmlap dmlap deleted the clamp-live-to-seekable branch June 26, 2015 16:10
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.

2 participants