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 video does not work under IE11 #51

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

Youtube video does not work under IE11 #51

menismu opened this issue Apr 4, 2018 · 0 comments

Comments

@menismu
Copy link
Owner

menismu commented Apr 4, 2018

Issue reported: mozilla#453
Reported by: @kristofferwiklund

@kristofferwiklund
kristofferwiklund commented on 1 Jul 2015
I have a very simple page.

<script src="/popcorn-js/dist/popcorn-complete.js"></script> <style> #video { width: 400px; height: 300px; } </style>

Video

<script> var wrapper = Popcorn.HTMLYouTubeVideoElement("#video"); wrapper.src = "https://www.youtube.com/watch?v=F7HcoKv11i0"; var pop = Popcorn(wrapper); pop.play(); </script> I have tried several prebuild version and also build one from source. The above code works nice in Chrome and Firefox on Windows. But with Internet Explorer 11 the video is loaded but nothing of popcornjs is run. The autoplay nor plugins are run.

On Mac and Safari the video is autoplaying as it should

I have also tried loading the video with:

document.addEventListener("DOMContentLoaded", function () {
var pop = Popcorn.youtube(
'#video',
'https://www.youtube.com/watch?v=F7HcoKv11i0' );
pop.play();
}, false);
As documented here http://popcornjs.org/popcorn-with-youtube. (Btw the demo is not working because of old version of popcornjs)

@TwoD
Contributor
TwoD commented on 9 Jul 2015
I have looked into this briefly and it appears that the YouTube plugin is getting stuck in onFirstPause, waiting for getCurrentTime() to return 0, which it never does.

There is a player.seekTo(0) in onFirstPlayed() just before the player is paused. The paused event does fire, but the current time is stuck at just a few 1/100s when it does.
Simply changing the getCurrentTime() comparison to make it > 0.2s or so will make it work reliably (autoplay, cues, seeking etc).

Stranglely enough, the problem only appears to happen when the files are fetched from the browser cache. Refreshing from the server with Ctrl+F5 made it autoplay without the change.

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