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.

DialInInfoApp.web.js 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3. import { I18nextProvider } from 'react-i18next';
  4. import parseURLParams from '../../../base/config/parseURLParams';
  5. import { i18next } from '../../../base/i18n';
  6. import { DialInSummary } from '../dial-in-summary';
  7. import NoRoomError from './NoRoomError';
  8. import { Platform } from '../../../base/react';
  9. document.addEventListener('DOMContentLoaded', () => {
  10. const { room } = parseURLParams(window.location, true, 'search');
  11. const OS = Platform.OS;
  12. const isUsingMobileBrowser = OS === 'android' || OS === 'ios';
  13. ReactDOM.render(
  14. <I18nextProvider i18n = { i18next }>
  15. { room
  16. ? <DialInSummary
  17. className = 'dial-in-page'
  18. clickableNumbers = { isUsingMobileBrowser }
  19. room = { decodeURIComponent(room) } />
  20. : <NoRoomError className = 'dial-in-page' /> }
  21. </I18nextProvider>,
  22. document.getElementById('react')
  23. );
  24. });
  25. window.addEventListener('beforeunload', () => {
  26. ReactDOM.unmountComponentAtNode(document.getElementById('react'));
  27. });