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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 translation from './modules/translation/translation';
  17. // Initialize Olm as early as possible.
  18. if (window.Olm) {
  19. window.Olm.init().catch(e => {
  20. console.error('Failed to initialize Olm, E2EE will be disabled', e);
  21. delete window.Olm;
  22. });
  23. }
  24. window.APP = {
  25. API,
  26. conference,
  27. // Used by do_external_connect.js if we receive the attach data after
  28. // connect was already executed. status property can be 'initialized',
  29. // 'ready', or 'connecting'. We are interested in 'ready' status only which
  30. // means that connect was executed but we have to wait for the attach data.
  31. // In status 'ready' handler property will be set to a function that will
  32. // finish the connect process when the attach data or error is received.
  33. connect: {
  34. handler: null,
  35. status: 'initialized'
  36. },
  37. // Used for automated performance tests.
  38. connectionTimes: {
  39. 'index.loaded': window.indexLoadedTime
  40. },
  41. keyboardshortcut,
  42. translation,
  43. UI
  44. };
  45. // TODO The execution of the mobile app starts from react/index.native.js.
  46. // Similarly, the execution of the Web app should start from react/index.web.js
  47. // for the sake of consistency and ease of understanding. Temporarily though
  48. // because we are at the beginning of introducing React into the Web app, allow
  49. // the execution of the Web app to start from app.js in order to reduce the
  50. // complexity of the beginning step.
  51. import './react';