From 817f2c290b1cca79c094b7455244cfcc6d5be4ef Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Fri, 5 Sep 2014 12:27:49 +0200 Subject: [PATCH] Show YT player container while player is loading to fix missing events on Firefox. --- static/js/directives/youtubevideo.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/js/directives/youtubevideo.js b/static/js/directives/youtubevideo.js index 18e4d0b5..ff48bfdf 100644 --- a/static/js/directives/youtubevideo.js +++ b/static/js/directives/youtubevideo.js @@ -292,7 +292,13 @@ define(['jquery', 'underscore', 'text!partials/youtubevideo.html', 'bigscreen'], "onStateChange": onPlayerStateChange } }); - $scope.isPublisher = with_controls; + $("#youtubeplayer").show(); + safeApply($scope, function(scope) { + // YT player events don't fire in Firefox if + // player is not visible, so show while loading + scope.playbackActive = true; + scope.isPublisher = with_controls; + }); } }); };