Browse Source

Merge pull request #92 from fancycode/youtube_fullscreen

Fixed broken fullscreen on YouTube player.
pull/97/head
Simon Eisenmann 12 years ago
parent
commit
1edfa75e2a
  1. 14
      static/js/directives/youtubevideo.js

14
static/js/directives/youtubevideo.js

@ -544,11 +544,23 @@ define(['jquery', 'underscore', 'text!partials/youtubevideo.html', 'bigscreen'], @@ -544,11 +544,23 @@ define(['jquery', 'underscore', 'text!partials/youtubevideo.html', 'bigscreen'],
}
});
$scope.toggleFullscreen = function(elem) {
if (BigScreen.enabled) {
if (elem) {
BigScreen.toggle(elem);
} else {
BigScreen.toggle(pane.get(0));
}
}
};
}];
var compile = function(tElement, tAttr) {
return function(scope, iElement, iAttrs, controller) {
$(iElement).on("dblclick", ".videoContainer", _.debounce(function(event) {
$(iElement).on("dblclick", "#youtubecontainer", _.debounce(function(event) {
scope.toggleFullscreen(event.delegateTarget);
}, 100, true));
}

Loading…
Cancel
Save