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

YouTube player start-pause causes issues with start position #50

Open
menismu opened this issue Apr 4, 2018 · 0 comments
Open

YouTube player start-pause causes issues with start position #50

menismu opened this issue Apr 4, 2018 · 0 comments

Comments

@menismu
Copy link
Owner

menismu commented Apr 4, 2018

Issue reported: mozilla#452
Reported by: @cvcmatthewmorgan

I understand that this might be a continuation to mozilla#430 but I felt this was a separate issue to do with the same section of code.

I am happy to contribute a pull request to fix the issue along with mozilla#430 but would like to discuss workflow here first.

Given the use of the following code, the start time is ignored.

document.addEventListener("DOMContentLoaded", function() {
var popcorn = Popcorn.smart("#video", "http://www.youtube.com/watch?v=eTKs27KcL00&t=10s");
}, false);
In the middle of onFirstPlay() there is a line that resets the video back to 0 which causes this to occur.

Suggested changes:

onFirstPlay() makes use of the start or t player variables instead of always going to 0.
onFirstPlay() should be triggered if player.seekTo() is going to be triggered or if preload() is required.
onFirstPlay() should not pause if autoplay is true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant