|
|
|
@ -22,7 +22,7 @@ |
|
|
|
"use strict"; |
|
|
|
"use strict"; |
|
|
|
define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapter'], function($, _, BigScreen, moment, sjcl, Modernizr) { |
|
|
|
define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapter'], function($, _, BigScreen, moment, sjcl, Modernizr) { |
|
|
|
|
|
|
|
|
|
|
|
return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", "localStorage", "screensharing", "localStatus", "dialogs", "rooms", "constraints", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload, localStorage, screensharing, localStatus, dialogs, rooms, constraints) { |
|
|
|
return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", "localStorage", "screensharing", "localStatus", "dialogs", "rooms", "constraints", "$document", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload, localStorage, screensharing, localStatus, dialogs, rooms, constraints, $document) { |
|
|
|
|
|
|
|
|
|
|
|
// Avoid accidential reloads or exits when in a call.
|
|
|
|
// Avoid accidential reloads or exits when in a call.
|
|
|
|
$($window).on("beforeunload", function(event) { |
|
|
|
$($window).on("beforeunload", function(event) { |
|
|
|
@ -39,6 +39,8 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'web |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var isNodeWebkitApp = !!$window.nwDispatcher |
|
|
|
|
|
|
|
if (isNodeWebkitApp) { |
|
|
|
// Enable app full screen listener.
|
|
|
|
// Enable app full screen listener.
|
|
|
|
$("#bar .logo").on("doubletap dblclick", _.debounce(function() { |
|
|
|
$("#bar .logo").on("doubletap dblclick", _.debounce(function() { |
|
|
|
if (BigScreen.enabled) { |
|
|
|
if (BigScreen.enabled) { |
|
|
|
@ -46,6 +48,18 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'web |
|
|
|
} |
|
|
|
} |
|
|
|
}, 100, true)); |
|
|
|
}, 100, true)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// App full screen exit escape key listener.
|
|
|
|
|
|
|
|
var escapeKeyCode = 27; |
|
|
|
|
|
|
|
$document.on('keydown', function(event) { |
|
|
|
|
|
|
|
if ($(event.target).is("input,textarea,select")) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (event.keyCode === escapeKeyCode && BigScreen.element) { |
|
|
|
|
|
|
|
BigScreen.toggle($("body").get(0)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Load default sounds.
|
|
|
|
// Load default sounds.
|
|
|
|
playSound.initialize({ |
|
|
|
playSound.initialize({ |
|
|
|
urls: ['sounds/sprite1.ogg', 'sounds/sprite1.mp3'], |
|
|
|
urls: ['sounds/sprite1.ogg', 'sounds/sprite1.mp3'], |
|
|
|
|