diff --git a/static/js/controllers/mediastreamcontroller.js b/static/js/controllers/mediastreamcontroller.js index a9e052bb..97e25b91 100644 --- a/static/js/controllers/mediastreamcontroller.js +++ b/static/js/controllers/mediastreamcontroller.js @@ -39,11 +39,11 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS }); // Enable app full screen listener. - $("#bar .logo").on("doubletap", function() { + $("#bar .logo").on("doubletap dblclick", _.debounce(function() { if (BigScreen.enabled) { BigScreen.toggle($("body").get(0)); } - }); + }, 100, true)); // Load default sounds. playSound.initialize({ diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 72ec68df..f45bbac2 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -147,6 +147,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ }); $scope.toggleFullscreen = function() { + //console.log("Toggle full screen", BigScreen.enabled, $scope.isActive, $scope.hasUsermedia); if (BigScreen.enabled && ($scope.isActive || $scope.hasUsermedia)) { $scope.layoutparent.toggleClass("fullscreen"); BigScreen.toggle($scope.layoutparent.get(0)); @@ -235,9 +236,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ //console.log("compile", arguments) - $(scope.card).on("doubletap", function() { - scope.toggleFullscreen(); - }); + $(scope.card).on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); var needsResize = false; scope.resize = function() { diff --git a/static/js/directives/screenshare.js b/static/js/directives/screenshare.js index cb8a121d..9f24533f 100644 --- a/static/js/directives/screenshare.js +++ b/static/js/directives/screenshare.js @@ -290,9 +290,9 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials var compile = function(tElement, tAttr) { return function(scope, iElement, iAttrs, controller) { - $(iElement).on("dblclick", ".remotescreen", function(event) { + $(iElement).on("dblclick", ".remotescreen", _.debounce(function(event) { scope.toggleFullscreen(event.delegateTarget); - }); + }, 100, true)); } };