Fixes issues with accessing modules not from APP object.
This commit is contained in:
parent
2f5d090ca5
commit
57fcee676a
|
@ -19,7 +19,7 @@
|
||||||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||||
<script src="interface_config.js?v=5"></script>
|
<script src="interface_config.js?v=5"></script>
|
||||||
<script src="libs/app.bundle.js?v=4"></script>
|
<script src="libs/app.bundle.js?v=5"></script>
|
||||||
|
|
||||||
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
<link rel="stylesheet" href="css/font.css?v=6"/>
|
||||||
|
|
|
@ -20,7 +20,7 @@ var APP =
|
||||||
function init() {
|
function init() {
|
||||||
|
|
||||||
APP.RTC.start();
|
APP.RTC.start();
|
||||||
APP.xmpp.start(APP.UI.getCreadentials);
|
APP.xmpp.start(APP.UI.getCredentials());
|
||||||
APP.statistics.start();
|
APP.statistics.start();
|
||||||
APP.connectionquality.init();
|
APP.connectionquality.init();
|
||||||
|
|
||||||
|
@ -1800,7 +1800,7 @@ UI.connectionIndicatorShowMore = function(id)
|
||||||
return VideoLayout.connectionIndicators[id].showMore();
|
return VideoLayout.connectionIndicators[id].showMore();
|
||||||
};
|
};
|
||||||
|
|
||||||
UI.getCreadentials = function () {
|
UI.getCredentials = function () {
|
||||||
var settings = this.getSettings();
|
var settings = this.getSettings();
|
||||||
return {
|
return {
|
||||||
bosh: document.getElementById('boshURL').value,
|
bosh: document.getElementById('boshURL').value,
|
||||||
|
@ -2781,7 +2781,7 @@ var Prezi = {
|
||||||
"Remove",
|
"Remove",
|
||||||
function(e,v,m,f) {
|
function(e,v,m,f) {
|
||||||
if(v) {
|
if(v) {
|
||||||
xmpp.removePreziFromPresence();
|
APP.xmpp.removePreziFromPresence();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -2833,7 +2833,7 @@ var Prezi = {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xmpp.addToPresence("prezi", urlValue);
|
APP.xmpp.addToPresence("prezi", urlValue);
|
||||||
$.prompt.close();
|
$.prompt.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2891,7 +2891,7 @@ function presentationAdded(event, jid, presUrl, currentSlide) {
|
||||||
VideoLayout.resizeThumbnails();
|
VideoLayout.resizeThumbnails();
|
||||||
|
|
||||||
var controlsEnabled = false;
|
var controlsEnabled = false;
|
||||||
if (jid === xmpp.myJid())
|
if (jid === APP.xmpp.myJid())
|
||||||
controlsEnabled = true;
|
controlsEnabled = true;
|
||||||
|
|
||||||
setPresentationVisible(true);
|
setPresentationVisible(true);
|
||||||
|
@ -2931,7 +2931,7 @@ function presentationAdded(event, jid, presUrl, currentSlide) {
|
||||||
preziPlayer.on(PreziPlayer.EVENT_STATUS, function(event) {
|
preziPlayer.on(PreziPlayer.EVENT_STATUS, function(event) {
|
||||||
console.log("prezi status", event.value);
|
console.log("prezi status", event.value);
|
||||||
if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
|
if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
|
||||||
if (jid != xmpp.myJid())
|
if (jid != APP.xmpp.myJid())
|
||||||
preziPlayer.flyToStep(currentSlide);
|
preziPlayer.flyToStep(currentSlide);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4386,7 +4386,7 @@ var ContactList = {
|
||||||
|
|
||||||
onDisplayNameChange: function (peerJid, displayName) {
|
onDisplayNameChange: function (peerJid, displayName) {
|
||||||
if (peerJid === 'localVideoContainer')
|
if (peerJid === 'localVideoContainer')
|
||||||
peerJid = xmpp.myJid();
|
peerJid = APP.xmpp.myJid();
|
||||||
|
|
||||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||||
|
|
||||||
|
@ -4480,7 +4480,7 @@ var SettingsMenu = {
|
||||||
var email = Settings.setEmail(newEmail);
|
var email = Settings.setEmail(newEmail);
|
||||||
|
|
||||||
|
|
||||||
Avatar.setUserAvatar(xmpp.myJid(), email);
|
Avatar.setUserAvatar(APP.xmpp.myJid(), email);
|
||||||
},
|
},
|
||||||
|
|
||||||
isVisible: function() {
|
isVisible: function() {
|
||||||
|
@ -4494,7 +4494,7 @@ var SettingsMenu = {
|
||||||
|
|
||||||
onDisplayNameChange: function(peerJid, newDisplayName) {
|
onDisplayNameChange: function(peerJid, newDisplayName) {
|
||||||
if(peerJid === 'localVideoContainer' ||
|
if(peerJid === 'localVideoContainer' ||
|
||||||
peerJid === xmpp.myJid()) {
|
peerJid === APP.xmpp.myJid()) {
|
||||||
this.setDisplayName(newDisplayName);
|
this.setDisplayName(newDisplayName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4640,7 +4640,7 @@ function hangup() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function toggleRecording() {
|
function toggleRecording() {
|
||||||
xmpp.toggleRecording(function (callback) {
|
APP.xmpp.toggleRecording(function (callback) {
|
||||||
APP.UI.messageHandler.openTwoButtonDialog(null,
|
APP.UI.messageHandler.openTwoButtonDialog(null,
|
||||||
'<h2>Enter recording token</h2>' +
|
'<h2>Enter recording token</h2>' +
|
||||||
'<input id="recordingToken" type="text" ' +
|
'<input id="recordingToken" type="text" ' +
|
||||||
|
@ -4673,7 +4673,7 @@ function lockRoom(lock) {
|
||||||
if (lock)
|
if (lock)
|
||||||
currentSharedKey = sharedKey;
|
currentSharedKey = sharedKey;
|
||||||
|
|
||||||
xmpp.lockRoom(currentSharedKey, function (res) {
|
APP.xmpp.lockRoom(currentSharedKey, function (res) {
|
||||||
// password is required
|
// password is required
|
||||||
if (sharedKey)
|
if (sharedKey)
|
||||||
{
|
{
|
||||||
|
@ -4755,7 +4755,7 @@ function callSipButtonClicked()
|
||||||
if (v) {
|
if (v) {
|
||||||
var numberInput = document.getElementById('sipNumber');
|
var numberInput = document.getElementById('sipNumber');
|
||||||
if (numberInput.value) {
|
if (numberInput.value) {
|
||||||
xmpp.dial(numberInput.value, 'fromnumber',
|
APP.xmpp.dial(numberInput.value, 'fromnumber',
|
||||||
UI.getRoomName(), sharedKey);
|
UI.getRoomName(), sharedKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12316,7 +12316,7 @@ JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {
|
||||||
* disabled; otherwise, <tt>false</tt>
|
* disabled; otherwise, <tt>false</tt>
|
||||||
*/
|
*/
|
||||||
JingleSession.prototype.isVideoMute = function () {
|
JingleSession.prototype.isVideoMute = function () {
|
||||||
var tracks = RTC.localVideo.getVideoTracks();
|
var tracks = APP.RTC.localVideo.getVideoTracks();
|
||||||
var mute = true;
|
var mute = true;
|
||||||
|
|
||||||
for (var i = 0; i < tracks.length; ++i) {
|
for (var i = 0; i < tracks.length; ++i) {
|
||||||
|
@ -12368,7 +12368,7 @@ JingleSession.prototype.setVideoMute = function (mute, callback, options) {
|
||||||
return callback(mute)
|
return callback(mute)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (mute == RTC.localVideo.isMuted())
|
if (mute == APP.RTC.localVideo.isMuted())
|
||||||
{
|
{
|
||||||
// Even if no change occurs, the specified callback is to be executed.
|
// Even if no change occurs, the specified callback is to be executed.
|
||||||
// The specified callback may, optionally, return a successCallback
|
// The specified callback may, optionally, return a successCallback
|
||||||
|
@ -12544,19 +12544,19 @@ function sendKeyframe(pc) {
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe setLocalDescription failed', error);
|
console.log('triggerKeyframe setLocalDescription failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe createAnswer failed', error);
|
console.log('triggerKeyframe createAnswer failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe setRemoteDescription failed', error);
|
console.log('triggerKeyframe setRemoteDescription failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -15910,7 +15910,7 @@ var XMPP = {
|
||||||
} else {
|
} else {
|
||||||
// We are done immediately
|
// We are done immediately
|
||||||
console.error("No conference handler");
|
console.error("No conference handler");
|
||||||
UI.messageHandler.showError('Error',
|
APP.UI.messageHandler.showError('Error',
|
||||||
'Unable to switch video stream.');
|
'Unable to switch video stream.');
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ var Prezi = {
|
||||||
"Remove",
|
"Remove",
|
||||||
function(e,v,m,f) {
|
function(e,v,m,f) {
|
||||||
if(v) {
|
if(v) {
|
||||||
xmpp.removePreziFromPresence();
|
APP.xmpp.removePreziFromPresence();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -91,7 +91,7 @@ var Prezi = {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xmpp.addToPresence("prezi", urlValue);
|
APP.xmpp.addToPresence("prezi", urlValue);
|
||||||
$.prompt.close();
|
$.prompt.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ function presentationAdded(event, jid, presUrl, currentSlide) {
|
||||||
VideoLayout.resizeThumbnails();
|
VideoLayout.resizeThumbnails();
|
||||||
|
|
||||||
var controlsEnabled = false;
|
var controlsEnabled = false;
|
||||||
if (jid === xmpp.myJid())
|
if (jid === APP.xmpp.myJid())
|
||||||
controlsEnabled = true;
|
controlsEnabled = true;
|
||||||
|
|
||||||
setPresentationVisible(true);
|
setPresentationVisible(true);
|
||||||
|
@ -189,7 +189,7 @@ function presentationAdded(event, jid, presUrl, currentSlide) {
|
||||||
preziPlayer.on(PreziPlayer.EVENT_STATUS, function(event) {
|
preziPlayer.on(PreziPlayer.EVENT_STATUS, function(event) {
|
||||||
console.log("prezi status", event.value);
|
console.log("prezi status", event.value);
|
||||||
if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
|
if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
|
||||||
if (jid != xmpp.myJid())
|
if (jid != APP.xmpp.myJid())
|
||||||
preziPlayer.flyToStep(currentSlide);
|
preziPlayer.flyToStep(currentSlide);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -169,7 +169,7 @@ var ContactList = {
|
||||||
|
|
||||||
onDisplayNameChange: function (peerJid, displayName) {
|
onDisplayNameChange: function (peerJid, displayName) {
|
||||||
if (peerJid === 'localVideoContainer')
|
if (peerJid === 'localVideoContainer')
|
||||||
peerJid = xmpp.myJid();
|
peerJid = APP.xmpp.myJid();
|
||||||
|
|
||||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ var SettingsMenu = {
|
||||||
var email = Settings.setEmail(newEmail);
|
var email = Settings.setEmail(newEmail);
|
||||||
|
|
||||||
|
|
||||||
Avatar.setUserAvatar(xmpp.myJid(), email);
|
Avatar.setUserAvatar(APP.xmpp.myJid(), email);
|
||||||
},
|
},
|
||||||
|
|
||||||
isVisible: function() {
|
isVisible: function() {
|
||||||
|
@ -33,7 +33,7 @@ var SettingsMenu = {
|
||||||
|
|
||||||
onDisplayNameChange: function(peerJid, newDisplayName) {
|
onDisplayNameChange: function(peerJid, newDisplayName) {
|
||||||
if(peerJid === 'localVideoContainer' ||
|
if(peerJid === 'localVideoContainer' ||
|
||||||
peerJid === xmpp.myJid()) {
|
peerJid === APP.xmpp.myJid()) {
|
||||||
this.setDisplayName(newDisplayName);
|
this.setDisplayName(newDisplayName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ function hangup() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function toggleRecording() {
|
function toggleRecording() {
|
||||||
xmpp.toggleRecording(function (callback) {
|
APP.xmpp.toggleRecording(function (callback) {
|
||||||
APP.UI.messageHandler.openTwoButtonDialog(null,
|
APP.UI.messageHandler.openTwoButtonDialog(null,
|
||||||
'<h2>Enter recording token</h2>' +
|
'<h2>Enter recording token</h2>' +
|
||||||
'<input id="recordingToken" type="text" ' +
|
'<input id="recordingToken" type="text" ' +
|
||||||
|
@ -123,7 +123,7 @@ function lockRoom(lock) {
|
||||||
if (lock)
|
if (lock)
|
||||||
currentSharedKey = sharedKey;
|
currentSharedKey = sharedKey;
|
||||||
|
|
||||||
xmpp.lockRoom(currentSharedKey, function (res) {
|
APP.xmpp.lockRoom(currentSharedKey, function (res) {
|
||||||
// password is required
|
// password is required
|
||||||
if (sharedKey)
|
if (sharedKey)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +205,7 @@ function callSipButtonClicked()
|
||||||
if (v) {
|
if (v) {
|
||||||
var numberInput = document.getElementById('sipNumber');
|
var numberInput = document.getElementById('sipNumber');
|
||||||
if (numberInput.value) {
|
if (numberInput.value) {
|
||||||
xmpp.dial(numberInput.value, 'fromnumber',
|
APP.xmpp.dial(numberInput.value, 'fromnumber',
|
||||||
UI.getRoomName(), sharedKey);
|
UI.getRoomName(), sharedKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {
|
||||||
* disabled; otherwise, <tt>false</tt>
|
* disabled; otherwise, <tt>false</tt>
|
||||||
*/
|
*/
|
||||||
JingleSession.prototype.isVideoMute = function () {
|
JingleSession.prototype.isVideoMute = function () {
|
||||||
var tracks = RTC.localVideo.getVideoTracks();
|
var tracks = APP.RTC.localVideo.getVideoTracks();
|
||||||
var mute = true;
|
var mute = true;
|
||||||
|
|
||||||
for (var i = 0; i < tracks.length; ++i) {
|
for (var i = 0; i < tracks.length; ++i) {
|
||||||
|
@ -1116,7 +1116,7 @@ JingleSession.prototype.setVideoMute = function (mute, callback, options) {
|
||||||
return callback(mute)
|
return callback(mute)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (mute == RTC.localVideo.isMuted())
|
if (mute == APP.RTC.localVideo.isMuted())
|
||||||
{
|
{
|
||||||
// Even if no change occurs, the specified callback is to be executed.
|
// Even if no change occurs, the specified callback is to be executed.
|
||||||
// The specified callback may, optionally, return a successCallback
|
// The specified callback may, optionally, return a successCallback
|
||||||
|
@ -1292,19 +1292,19 @@ function sendKeyframe(pc) {
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe setLocalDescription failed', error);
|
console.log('triggerKeyframe setLocalDescription failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe createAnswer failed', error);
|
console.log('triggerKeyframe createAnswer failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.log('triggerKeyframe setRemoteDescription failed', error);
|
console.log('triggerKeyframe setRemoteDescription failed', error);
|
||||||
UI.messageHandler.showError();
|
APP.UI.messageHandler.showError();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,7 +246,7 @@ var XMPP = {
|
||||||
} else {
|
} else {
|
||||||
// We are done immediately
|
// We are done immediately
|
||||||
console.error("No conference handler");
|
console.error("No conference handler");
|
||||||
UI.messageHandler.showError('Error',
|
APP.UI.messageHandler.showError('Error',
|
||||||
'Unable to switch video stream.');
|
'Unable to switch video stream.');
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue