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 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* application specific logic */
  2. import 'jquery';
  3. import 'jquery-contextmenu';
  4. import 'jQuery-Impromptu';
  5. import 'olm';
  6. import 'focus-visible';
  7. // We need to setup the jitsi-local-storage as early as possible so that we can start using it.
  8. // NOTE: If jitsi-local-storage is used before the initial setup is performed this will break the use case when we use
  9. // the local storage from the parent page when the localStorage is disabled. Also the setup is relying that
  10. // window.location is not changed and still has all URL parameters.
  11. import './react/features/base/jitsi-local-storage/setup';
  12. import conference from './conference';
  13. import API from './modules/API';
  14. import UI from './modules/UI/UI';
  15. import keyboardshortcut from './modules/keyboardshortcut/keyboardshortcut';
  16. import remoteControl from './modules/remotecontrol/RemoteControl';
  17. import translation from './modules/translation/translation';
  18. // Initialize Olm as early as possible.
  19. if (window.Olm) {
  20. window.Olm.init().catch(e => {
  21. console.error('Failed to initialize Olm, E2EE will be disabled', e);
  22. delete window.Olm;
  23. });
  24. }
  25. window.APP = {
  26. API,
  27. conference,
  28. // Used by do_external_connect.js if we receive the attach data after
  29. // connect was already executed. status property can be 'initialized',
  30. // 'ready', or 'connecting'. We are interested in 'ready' status only which
  31. // means that connect was executed but we have to wait for the attach data.
  32. // In status 'ready' handler property will be set to a function that will
  33. // finish the connect process when the attach data or error is received.
  34. connect: {
  35. handler: null,
  36. status: 'initialized'
  37. },
  38. // Used for automated performance tests.
  39. connectionTimes: {
  40. 'index.loaded': window.indexLoadedTime
  41. },
  42. keyboardshortcut,
  43. remoteControl,
  44. translation,
  45. UI
  46. };
  47. // TODO The execution of the mobile app starts from react/index.native.js.
  48. // Similarly, the execution of the Web app should start from react/index.web.js
  49. // for the sake of consistency and ease of understanding. Temporarily though
  50. // because we are at the beginning of introducing React into the Web app, allow
  51. // the execution of the Web app to start from app.js in order to reduce the
  52. // complexity of the beginning step.
  53. import './react';