Skip to content
Snippets Groups Projects
Commit cf7f2dab authored by Christophe HAMERLING's avatar Christophe HAMERLING Committed by Saúl Ibarra Corretgé
Browse files

Add support for URL query parameters

parent e7deabb8
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment