2013-12-16 11:22:23 +00:00
|
|
|
/* jshint -W117 */
|
|
|
|
/* application specific logic */
|
2014-05-12 09:56:33 +00:00
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
var APP =
|
|
|
|
{
|
|
|
|
init: function () {
|
|
|
|
this.UI = require("./modules/UI/UI");
|
|
|
|
this.API = require("./modules/API/API");
|
|
|
|
this.connectionquality = require("./modules/connectionquality/connectionquality");
|
|
|
|
this.statistics = require("./modules/statistics/statistics");
|
|
|
|
this.RTC = require("./modules/RTC/RTC");
|
|
|
|
this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
|
|
|
|
this.xmpp = require("./modules/xmpp/xmpp");
|
|
|
|
this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
|
2015-02-06 15:46:50 +00:00
|
|
|
this.translation = require("./modules/translation/translation");
|
2015-03-09 15:50:13 +00:00
|
|
|
this.settings = require("./modules/settings/Settings");
|
2015-04-07 16:01:19 +00:00
|
|
|
this.DTMF = require("./modules/DTMF/DTMF");
|
2015-04-12 12:18:24 +00:00
|
|
|
this.members = require("./modules/members/MemberList");
|
2015-01-28 14:35:22 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
function init() {
|
2014-11-06 13:54:47 +00:00
|
|
|
|
2015-07-10 09:57:20 +00:00
|
|
|
APP.desktopsharing.init();
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.RTC.start();
|
2015-03-09 15:16:06 +00:00
|
|
|
APP.xmpp.start();
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.statistics.start();
|
|
|
|
APP.connectionquality.init();
|
|
|
|
APP.keyboardshortcut.init();
|
2015-04-12 12:18:24 +00:00
|
|
|
APP.members.start();
|
2013-12-16 11:22:23 +00:00
|
|
|
}
|
|
|
|
|
2014-07-28 11:31:32 +00:00
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
$(document).ready(function () {
|
2015-01-07 14:54:03 +00:00
|
|
|
|
2015-05-25 14:42:59 +00:00
|
|
|
var URLPRocessor = require("./modules/URLProcessor/URLProcessor");
|
|
|
|
URLPRocessor.setConfigParametersFromUrl();
|
2015-01-28 14:35:22 +00:00
|
|
|
APP.init();
|
2014-08-21 16:42:54 +00:00
|
|
|
|
2015-02-06 15:46:50 +00:00
|
|
|
APP.translation.init();
|
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
if(APP.API.isEnabled())
|
|
|
|
APP.API.init();
|
|
|
|
|
|
|
|
APP.UI.start(init);
|
2015-01-22 16:26:05 +00:00
|
|
|
|
2013-12-16 11:22:23 +00:00
|
|
|
});
|
|
|
|
|
2013-12-30 08:31:08 +00:00
|
|
|
$(window).bind('beforeunload', function () {
|
2015-01-28 14:35:22 +00:00
|
|
|
if(APP.API.isEnabled())
|
|
|
|
APP.API.dispose();
|
2013-12-16 11:22:23 +00:00
|
|
|
});
|
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
module.exports = APP;
|
|
|
|
|