Give the jitsi wrapper its own external api script
This commit is contained in:
parent
e895fed180
commit
421fcb115f
5 changed files with 6 additions and 16 deletions
|
@ -15,5 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- This script is not webpacked, and the script is downloaded at build time -->
|
||||
<script src="./jitsi_external_api.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -52,7 +52,6 @@ let widgetApi: WidgetApi;
|
|||
// Set this up as early as possible because Riot will be hitting it almost immediately.
|
||||
widgetApi = new WidgetApi(qsParam('parentUrl'), qsParam('widgetId'), [
|
||||
Capability.AlwaysOnScreen,
|
||||
Capability.GetRiotWebConfig,
|
||||
]);
|
||||
widgetApi.expectingExplicitReady = true;
|
||||
|
||||
|
@ -66,14 +65,6 @@ let widgetApi: WidgetApi;
|
|||
await widgetApi.waitReady();
|
||||
await widgetApi.setAlwaysOnScreen(false); // start off as detachable from the screen
|
||||
|
||||
const riotConfig = await widgetApi.getRiotConfig();
|
||||
|
||||
// Get the Jitsi Meet API loaded up as fast as possible, but ensure that the widget's postMessage
|
||||
// receiver (WidgetApi) is up and running first.
|
||||
const scriptTag = document.createElement("script");
|
||||
scriptTag.src = riotConfig['jitsi']['externalApiUrl'];
|
||||
document.body.appendChild(scriptTag);
|
||||
|
||||
// TODO: register widgetApi listeners for PTT controls (https://github.com/vector-im/riot-web/issues/12795)
|
||||
|
||||
document.getElementById("joinButton").onclick = () => joinConference();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue