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

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