Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.web.js 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* global APP */
  2. import React from 'react';
  3. import ReactDOM from 'react-dom';
  4. import { getJitsiMeetTransport } from '../modules/transport';
  5. import config from './config';
  6. import { App } from './features/app';
  7. const logger = require('jitsi-meet-logger').getLogger(__filename);
  8. /**
  9. * Renders the app when the DOM tree has been loaded.
  10. */
  11. document.addEventListener('DOMContentLoaded', () => {
  12. const now = window.performance.now();
  13. APP.connectionTimes['document.ready'] = now;
  14. logger.log('(TIME) document ready:\t', now);
  15. // Render the main Component.
  16. ReactDOM.render(
  17. <App config = { config } />,
  18. document.getElementById('react'));
  19. });
  20. /**
  21. * Stops collecting the logs and disposing the API when the user closes the
  22. * page.
  23. */
  24. window.addEventListener('beforeunload', () => {
  25. // Stop the LogCollector
  26. if (APP.logCollectorStarted) {
  27. APP.logCollector.stop();
  28. APP.logCollectorStarted = false;
  29. }
  30. APP.API.dispose();
  31. getJitsiMeetTransport().dispose();
  32. });