mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Parsing the API ID happens at import time, which is not great because it also runs when loading the external API file. In sites with weird URL patterns, such as Angular this will throw an exception. Ignore parsing errors so it's left undefined. When modules/ is refactored we should look into making this a getter of some sort. Fixes: https://github.com/jitsi/jitsi-meet/issues/11565
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
// XXX The function parseURLParams is exported by the feature base/util (as
|
|
// defined in the terminology of react/). However, this file is (very likely)
|
|
// bundled in external_api in addition to app.bundle and, consequently, it is
|
|
// best to import as little as possible here (rather than the whole feature
|
|
// base/util) in order to minimize the amount of source code bundled into
|
|
// multiple bundles.
|
|
import { parseURLParams } from '../../react/features/base/util/parseURLParams';
|
|
|
|
/**
|
|
* JitsiMeetExternalAPI id - unique for a webpage.
|
|
* TODO: This shouldn't be computed here.
|
|
*/
|
|
let _apiID;
|
|
|
|
try {
|
|
_apiID = parseURLParams(window.location).jitsi_meet_external_api_id;
|
|
} catch (_) { /* Ignore. */ }
|
|
|
|
export const API_ID = _apiID;
|
|
|
|
/**
|
|
* The payload name for the datachannel/endpoint text message event.
|
|
*/
|
|
export const ENDPOINT_TEXT_MESSAGE_NAME = 'endpoint-text-message';
|
|
|
|
/**
|
|
* The min value that can be set for the assumed bandwidth.
|
|
* Setting it to this value means not assuming any bandwidth,
|
|
* but rather allowing the estimations to take place.
|
|
*/
|
|
export const MIN_ASSUMED_BANDWIDTH_BPS = -1;
|