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

Fixes #1018 #1055

Merged
merged 2 commits into from
Jan 25, 2016
Merged

Conversation

LloydW93
Copy link
Member

Currently, playback resumes if you pause then seek if both autoplay and scheduleWhilePaused are true.

This is because after a see, a canplay will fire from the media element once content is in the buffer. Dash.js considers this the same as it does the first at startup and starts playback.

However, removing the startAutoPlay line from the onCanPlay event results in further problems. We use the autoplay property of the media element itself to track whether or not we are actively "trying to play", with the bonus of actually starting playback on a canplay event if that is the case.

I'm sure you'll think the direct access of element.autoplay here isn't great, and I agree and am open to ways to handle this better. I'd like to do it all in the playbackController, but part of the problem is that you can't call play() on the playbackController until it has been initialized, and it isn't initialized until the MPD is loaded etc. I'd be happy to take on board any suggestions to refactor this in a nicer way if it isn't a large piece of work.

Lloyd Wallis added 2 commits January 25, 2016 15:44
…ute. We should likely investigate whether better separation of concerns is possible here - MediaPlayer itself touching the element is almost certainly bad, but playbackController isn't ready until the MPD is loaded etc
@LloydW93
Copy link
Member Author

@dsparacio
Copy link
Contributor

@LloydW93 This seems like a nice fix for the time being and maybe when we do some refactor work for the loaders and the index handlers we can include this as well.

dsparacio pushed a commit that referenced this pull request Jan 25, 2016
@dsparacio dsparacio merged commit 63fbf8d into Dash-Industry-Forum:development Jan 25, 2016
@LloydW93 LloydW93 deleted the 20-fixup-autoplay branch January 25, 2016 19:41
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.

2 participants