Browse Source

Also use dblclick event for fullscreen trigger.

pull/13/merge
Simon Eisenmann 12 years ago
parent
commit
5d60f8216b
  1. 4
      static/js/controllers/mediastreamcontroller.js
  2. 5
      static/js/directives/audiovideo.js
  3. 4
      static/js/directives/screenshare.js

4
static/js/controllers/mediastreamcontroller.js

@ -39,11 +39,11 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS @@ -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({

5
static/js/directives/audiovideo.js

@ -147,6 +147,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -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/ @@ -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() {

4
static/js/directives/screenshare.js

@ -290,9 +290,9 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials @@ -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));
}
};

Loading…
Cancel
Save