For lack of a better word/phrase, I'm calling all changes coding style. I'm targeting readability through naming and syntax.
34 lines
807 B
JavaScript
34 lines
807 B
JavaScript
import { API_ID } from '../API';
|
|
import { getJitsiMeetGlobalNS } from '../util/helpers';
|
|
|
|
import Transport from './Transport';
|
|
import PostMessageTransportBackend from './PostMessageTransportBackend';
|
|
|
|
/**
|
|
* Option for the default low level transport.
|
|
*
|
|
* @type {Object}
|
|
*/
|
|
const postisOptions = {};
|
|
|
|
if (typeof API_ID === 'number') {
|
|
postisOptions.scope = `jitsi_meet_external_api_${API_ID}`;
|
|
}
|
|
|
|
export const transport = new Transport({
|
|
transport: new PostMessageTransportBackend({
|
|
enableLegacyFormat: true,
|
|
postisOptions
|
|
})
|
|
});
|
|
|
|
/**
|
|
* Sets the transport to passed transport.
|
|
*
|
|
* @param {Object} newTransport - The new transport.
|
|
* @returns {void}
|
|
*/
|
|
getJitsiMeetGlobalNS().useNewExternalTransport = function(newTransport) {
|
|
transport.setTransport(newTransport);
|
|
};
|