Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure content loops #259

Merged
merged 4 commits into from
Oct 15, 2018
Merged

fix: ensure content loops #259

merged 4 commits into from
Oct 15, 2018

Conversation

mister-ben
Copy link
Contributor

@mister-ben mister-ben commented Oct 13, 2018

Description

Fixes #231, playback stalls if looping

Specific Changes proposed

On a seek to 0 when loop enabled, call setCurrentTime(0) on vhs.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@welcome
Copy link

welcome bot commented Oct 13, 2018

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

forbesjo
forbesjo previously approved these changes Oct 15, 2018
Copy link
Contributor

@gesinger gesinger left a comment

Choose a reason for hiding this comment

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

Looks good, and thanks for the fix! A couple of minor comments.

@@ -320,6 +320,13 @@ class HlsHandler extends Component {
this.masterPlaylistController_.smoothQualityChange_();
}
});

this.on(this.tech_, 'seeking', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be worth us adding a comment essentially saying that the middleware can't catch looping behavior because the tech fires a seeking event and we don't get that through the middleware, thus we listen for that specific case.

type: 'application/x-mpegURL'
});
player.one('playing', function() {
player.vhs.mediaSource.on('sourceopen', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for the playing event to fire before the media source is opened? If so, it may be best for us to add one more listener (for ended), then check for sourceopen after that.

@forbesjo forbesjo merged commit 26300df into videojs:master Oct 15, 2018
@welcome
Copy link

welcome bot commented Oct 15, 2018

Congrats on merging your first pull request! 🎉🎉🎉

@mister-ben mister-ben deleted the fix-loop branch October 15, 2018 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7.2.0 to 7.2.4 playback does not restart with loop
3 participants