You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* jshint -W117 */
  2. /* application specific logic */
  3. var APP =
  4. {
  5. init: function () {
  6. this.UI = require("./modules/UI/UI");
  7. this.API = require("./modules/API/API");
  8. this.connectionquality = require("./modules/connectionquality/connectionquality");
  9. this.statistics = require("./modules/statistics/statistics");
  10. this.RTC = require("./modules/RTC/RTC");
  11. this.simulcast = require("./modules/simulcast/simulcast");
  12. this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
  13. this.xmpp = require("./modules/xmpp/xmpp");
  14. this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
  15. }
  16. };
  17. function init() {
  18. APP.RTC.start();
  19. APP.xmpp.start(APP.UI.getCreadentials);
  20. APP.statistics.start();
  21. APP.connectionquality.init();
  22. // Set default desktop sharing method
  23. APP.desktopsharing.init();
  24. APP.keyboardshortcut.init();
  25. }
  26. $(document).ready(function () {
  27. APP.init();
  28. if(APP.API.isEnabled())
  29. APP.API.init();
  30. APP.UI.start(init);
  31. });
  32. $(window).bind('beforeunload', function () {
  33. if(APP.API.isEnabled())
  34. APP.API.dispose();
  35. });
  36. module.exports = APP;