From 3423f43f2f7667d6859da905913a13dd16c2b2dd Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 3 Jan 2015 21:36:58 -0500 Subject: [PATCH] https://www.youtube.com/watch?v=9u6Bfnq3aZk --- www/js/player.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/www/js/player.js b/www/js/player.js index d0d0ef57..ae90590a 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -42,6 +42,10 @@ var YouTubePlayer = function (data) { */ if (ev.data === YT.PlayerState.PLAYING && self.theYouTubeDevsNeedToFixThisShit) { + + if (USEROPTS.default_quality) { + self.player.setPlaybackQuality(USEROPTS.default_quality); + } PLAYER.seek(0.000001); PLAYER.pause(); self.theYouTubeDevsNeedToFixThisShit = false; @@ -69,11 +73,6 @@ var YouTubePlayer = function (data) { self.load = function (data) { if(self.player && self.player.loadVideoById) { self.player.loadVideoById(data.id, data.currentTime); - if (USEROPTS.default_quality) { - self.player.setPlaybackQuality(USEROPTS.default_quality); - // What's that? Another stupid hack for the HTML5 player? - self.player.setPlaybackQuality(USEROPTS.default_quality); - } self.videoId = data.id; self.videoLength = data.seconds; }