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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Jitsi Meet app main entrypoint. */
  2. // Re-export jQuery
  3. // FIXME: Remove this requirement from torture tests.
  4. import $ from 'jquery';
  5. window.$ = window.jQuery = $;
  6. import '@matrix-org/olm';
  7. import 'focus-visible';
  8. /*
  9. * Safari polyfill for createImageBitmap
  10. * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap
  11. *
  12. * Support source image types: Canvas.
  13. */
  14. if (!('createImageBitmap' in window)) {
  15. window.createImageBitmap = function(data) {
  16. return new Promise((resolve, reject) => {
  17. let dataURL;
  18. if (data instanceof HTMLCanvasElement) {
  19. dataURL = data.toDataURL();
  20. } else {
  21. reject(new Error('createImageBitmap does not handle the provided image source type'));
  22. }
  23. const img = document.createElement('img');
  24. img.addEventListener('load', () => {
  25. resolve(img);
  26. });
  27. img.src = dataURL;
  28. });
  29. };
  30. }
  31. // We need to setup the jitsi-local-storage as early as possible so that we can start using it.
  32. // NOTE: If jitsi-local-storage is used before the initial setup is performed this will break the use case when we use
  33. // the local storage from the parent page when the localStorage is disabled. Also the setup is relying that
  34. // window.location is not changed and still has all URL parameters.
  35. import './react/features/base/jitsi-local-storage/setup';
  36. import conference from './conference';
  37. import API from './modules/API';
  38. import UI from './modules/UI/UI';
  39. import translation from './modules/translation/translation';
  40. import * as jc3 from './rdev/hooks/hooks';
  41. // Initialize Olm as early as possible.
  42. if (window.Olm) {
  43. window.Olm.init().catch(e => {
  44. console.error('Failed to initialize Olm, E2EE will be disabled', e);
  45. delete window.Olm;
  46. });
  47. }
  48. window.APP = {
  49. API,
  50. conference,
  51. translation,
  52. UI
  53. };
  54. window.jc3=jc3
  55. // TODO The execution of the mobile app starts from react/index.native.js.
  56. // Similarly, the execution of the Web app should start from react/index.web.js
  57. // for the sake of consistency and ease of understanding. Temporarily though
  58. // because we are at the beginning of introducing React into the Web app, allow
  59. // the execution of the Web app to start from app.js in order to reduce the
  60. // complexity of the beginning step.
  61. import './react';