Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[#1438] youtube's unstarted event is not enough in all cases, trying onR... #292

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +8 −8 wrappers/youtube/popcorn.HTMLYouTubeVideoElement.js
View
16 wrappers/youtube/popcorn.HTMLYouTubeVideoElement.js
@@ -102,6 +102,14 @@
function onPlayerReady( event ) {
playerReady = true;
+ // XXX: this should really live in cued below, but doesn't work.
+
+ // Browsers using flash will have the pause() call take too long and cause some
+ // sound to leak out. Muting before to prevent this.
+ player.mute();
+
+ // force an initial play on the video, to remove autostart on initial seekTo.
+ player.playVideo();
}
function getDuration() {
@@ -170,14 +178,6 @@
// unstarted
case -1:
- // XXX: this should really live in cued below, but doesn't work.
-
- // Browsers using flash will have the pause() call take too long and cause some
- // sound to leak out. Muting before to prevent this.
- player.mute();
-
- // force an initial play on the video, to remove autostart on initial seekTo.
- player.playVideo();
break;
// ended
Something went wrong with that request. Please try again.