Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Reduce the dependencies of the Web ExternalAPI

Lyubo Marinov15ab7a292c12
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 8b0970101b..8979a9d860 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -1,6 +1,6 @@
import EventEmitter from 'events';
-import { urlObjectToString } from '../../../react/features/base/util';
+import { urlObjectToString } from '../../../react/features/base/util/uri.js';
import {
PostMessageTransportBackend,
Transport
diff --git a/react/features/base/util/loadScript.web.js b/react/features/base/util/loadScript.web.js
index c1832fa583..01b7c78228 100644
--- a/react/features/base/util/loadScript.web.js
+++ b/react/features/base/util/loadScript.web.js
@@ -1,4 +1,6 @@
-import JitsiMeetJS from '../lib-jitsi-meet';
+/* @flow */
+
+declare var JitsiMeetJS: Object;
/**
* Loads a script from a specific URL. The script will be interpreted upon load.
@@ -7,13 +9,13 @@ import JitsiMeetJS from '../lib-jitsi-meet';
* @returns {Promise} Resolved with no arguments when the script is loaded and
* rejected with the error from JitsiMeetJS.ScriptUtil.loadScript method.
*/
-export function loadScript(url) {
+export function loadScript(url: string) {
return new Promise((resolve, reject) =>
JitsiMeetJS.util.ScriptUtil.loadScript(
url,
/* async */ true,
/* prepend */ false,
/* relativeURL */ false,
- /* loadCallback */ () => resolve(),
- /* errorCallback */ error => reject(error)));
+ /* loadCallback */ resolve,
+ /* errorCallback */ reject));
}