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.

index.js 807B

123456789101112131415161718192021222324252627282930313233
  1. import { API_ID } from '../API';
  2. import { getJitsiMeetGlobalNS } from '../util/helpers';
  3. import Transport from './Transport';
  4. import PostMessageTransportBackend from './PostMessageTransportBackend';
  5. /**
  6. * Option for the default low level transport.
  7. *
  8. * @type {Object}
  9. */
  10. const postisOptions = {};
  11. if (typeof API_ID === 'number') {
  12. postisOptions.scope = `jitsi_meet_external_api_${API_ID}`;
  13. }
  14. export const transport = new Transport({
  15. transport: new PostMessageTransportBackend({
  16. enableLegacyFormat: true,
  17. postisOptions
  18. })
  19. });
  20. /**
  21. * Sets the transport to passed transport.
  22. *
  23. * @param {Object} newTransport - The new transport.
  24. * @returns {void}
  25. */
  26. getJitsiMeetGlobalNS().useNewExternalTransport = function(newTransport) {
  27. transport.setTransport(newTransport);
  28. };