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

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