-
Notifications
You must be signed in to change notification settings - Fork 428
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
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
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. |
There was a problem hiding this 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() { |
There was a problem hiding this comment.
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.
test/playback.test.js
Outdated
type: 'application/x-mpegURL' | ||
}); | ||
player.one('playing', function() { | ||
player.vhs.mediaSource.on('sourceopen', () => { |
There was a problem hiding this comment.
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.
Congrats on merging your first pull request! 🎉🎉🎉 |
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