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.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.desktopsharing = require("./modules/desktopsharing/desktopsharing");
  12. this.xmpp = require("./modules/xmpp/xmpp");
  13. this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
  14. this.translation = require("./modules/translation/translation");
  15. this.settings = require("./modules/settings/Settings");
  16. this.DTMF = require("./modules/DTMF/DTMF");
  17. this.members = require("./modules/members/MemberList");
  18. }
  19. };
  20. function init() {
  21. APP.RTC.start();
  22. APP.xmpp.start();
  23. APP.statistics.start();
  24. APP.connectionquality.init();
  25. // Set default desktop sharing method
  26. APP.desktopsharing.init();
  27. APP.keyboardshortcut.init();
  28. APP.members.start();
  29. }
  30. $(document).ready(function () {
  31. var URLPRocessor = require("./modules/URLProcessor/URLProcessor");
  32. URLPRocessor.setConfigParametersFromUrl();
  33. APP.init();
  34. APP.translation.init();
  35. if(APP.API.isEnabled())
  36. APP.API.init();
  37. APP.UI.start(init);
  38. });
  39. $(window).bind('beforeunload', function () {
  40. if(APP.API.isEnabled())
  41. APP.API.dispose();
  42. });
  43. module.exports = APP;