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

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