Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(iframe_api): Add jwt token parameter
hristoterezovaeb301c8d52a
diff --git a/doc/api.md b/doc/api.mdindex 12b6652e8a..8df9ef9c08 100644--- a/doc/api.md+++ b/doc/api.md@@ -40,6 +40,14 @@ var interfaceConfigOverwrite = {filmStripOnly: true};var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, configOverwrite, interfaceConfigOverwrite);```+You can also pass jwt token to Jitsi Meet:++ ```javascript+ var jwt = "<jwt_token>";+ var noSsl = false;+ var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, configOverwrite, interfaceConfigOverwrite, noSsl, jwt);+ ```+## Controlling the embedded Jitsi Meet ConferenceYou can control the embedded Jitsi Meet conference using the `JitsiMeetExternalAPI` object by using `executeCommand`:diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.jsindex eaa5c414b5..4d5e43c3e2 100644--- a/modules/API/external/external_api.js+++ b/modules/API/external/external_api.js@@ -93,10 +93,12 @@ function changeParticipantNumber(APIInstance, number) {* @param interfaceConfigOverwrite object containing configuration options* defined in interface_config.js to be overridden.* @param noSsl if the value is true https won't be used+ * @param {string} [jwt] the JWT token if needed by jitsi-meet for+ * authentication.* @constructor*/function JitsiMeetExternalAPI(domain, room_name, width, height, parentNode,- configOverwrite, interfaceConfigOverwrite, noSsl) {+ configOverwrite, interfaceConfigOverwrite, noSsl, jwt) {if (!width || width < MIN_WIDTH)width = MIN_WIDTH;if (!height || height < MIN_HEIGHT)@@ -121,6 +123,11 @@ function JitsiMeetExternalAPI(domain, room_name, width, height, parentNode,this.url = (noSsl) ? "http" : "https" +"://" + domain + "/";if(room_name)this.url += room_name;++ if (jwt) {+ this.url += '?jwt=' + jwt;+ }+this.url += "#jitsi_meet_external_api_id=" + id;var key;