aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChristophe HAMERLING <chamerling@linagora.com>2020-04-20 14:14:47 +0200
committerSaúl Ibarra Corretgé <s@saghul.net>2020-04-30 22:35:16 +0200
commitcf7f2dabfb0762f5294c4cadb40c329c70987ff2 (patch)
treeb4e7fb7f9fb8382b2ee22f6939d8f5bd68c75a20 /app
parente7deabb8f4c117c6e3536fd8f0da98fbd5d25190 (diff)
Add support for URL query parameters
Diffstat (limited to 'app')
-rw-r--r--app/features/conference/components/Conference.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js
index 30d6139..0b8b798 100644
--- a/app/features/conference/components/Conference.js
+++ b/app/features/conference/components/Conference.js
@@ -241,19 +241,27 @@ class Conference extends Component<Props, State> {
*/
_onScriptLoad(parentNode: Object) {
const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI;
-
+ const url = new URL(this._conference.room, this._conference.serverURL);
+ const roomName = url.pathname.split('/').pop();
const host = this._conference.serverURL.replace(/https?:\/\//, '');
+ const searchParameters = Object.fromEntries(url.searchParams);
+ const urlParameters = Object.keys(searchParameters).length ? searchParameters : {};
const configOverwrite = {
startWithAudioMuted: this.props._startWithAudioMuted,
startWithVideoMuted: this.props._startWithVideoMuted
};
- this._api = new JitsiMeetExternalAPI(host, {
+ const options = {
configOverwrite,
onload: this._onIframeLoad,
parentNode,
- roomName: this._conference.room
+ roomName
+ };
+
+ this._api = new JitsiMeetExternalAPI(host, {
+ ...options,
+ ...urlParameters
});
const { RemoteControl,