jiti-meet/app.js

55 lines
1.3 KiB
JavaScript
Raw Normal View History

2013-12-16 11:22:23 +00:00
/* jshint -W117 */
/* application specific logic */
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.simulcast = require("./modules/simulcast/simulcast");
this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
this.xmpp = require("./modules/xmpp/xmpp");
this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
this.translation = require("./modules/translation/translation");
2015-03-09 15:50:13 +00:00
this.settings = require("./modules/settings/Settings");
}
};
2013-12-16 11:22:23 +00:00
function init() {
APP.RTC.start();
APP.xmpp.start();
APP.statistics.start();
APP.connectionquality.init();
// Set default desktop sharing method
APP.desktopsharing.init();
APP.keyboardshortcut.init();
2013-12-16 11:22:23 +00:00
}
2013-12-16 11:22:23 +00:00
$(document).ready(function () {
2015-01-07 14:54:03 +00:00
APP.init();
2014-08-21 16:42:54 +00:00
APP.translation.init();
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
});
$(window).bind('beforeunload', function () {
if(APP.API.isEnabled())
APP.API.dispose();
2013-12-16 11:22:23 +00:00
});
module.exports = APP;