您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

app.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* application specific logic */
  2. import 'jquery';
  3. import 'jquery-contextmenu';
  4. import 'jQuery-Impromptu';
  5. import 'olm';
  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 remoteControl from './modules/remotecontrol/RemoteControl';
  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. remoteControl,
  43. translation,
  44. UI
  45. };
  46. // TODO The execution of the mobile app starts from react/index.native.js.
  47. // Similarly, the execution of the Web app should start from react/index.web.js
  48. // for the sake of consistency and ease of understanding. Temporarily though
  49. // because we are at the beginning of introducing React into the Web app, allow
  50. // the execution of the Web app to start from app.js in order to reduce the
  51. // complexity of the beginning step.
  52. import './react';