mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-02 16:54:52 +02:00
Add support for URL query parameters
This commit is contained in:
parent
e7deabb8f4
commit
cf7f2dabfb
|
@ -241,19 +241,27 @@ class Conference extends Component<Props, State> {
|
||||||
*/
|
*/
|
||||||
_onScriptLoad(parentNode: Object) {
|
_onScriptLoad(parentNode: Object) {
|
||||||
const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI;
|
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 host = this._conference.serverURL.replace(/https?:\/\//, '');
|
||||||
|
const searchParameters = Object.fromEntries(url.searchParams);
|
||||||
|
const urlParameters = Object.keys(searchParameters).length ? searchParameters : {};
|
||||||
|
|
||||||
const configOverwrite = {
|
const configOverwrite = {
|
||||||
startWithAudioMuted: this.props._startWithAudioMuted,
|
startWithAudioMuted: this.props._startWithAudioMuted,
|
||||||
startWithVideoMuted: this.props._startWithVideoMuted
|
startWithVideoMuted: this.props._startWithVideoMuted
|
||||||
};
|
};
|
||||||
|
|
||||||
this._api = new JitsiMeetExternalAPI(host, {
|
const options = {
|
||||||
configOverwrite,
|
configOverwrite,
|
||||||
onload: this._onIframeLoad,
|
onload: this._onIframeLoad,
|
||||||
parentNode,
|
parentNode,
|
||||||
roomName: this._conference.room
|
roomName
|
||||||
|
};
|
||||||
|
|
||||||
|
this._api = new JitsiMeetExternalAPI(host, {
|
||||||
|
...options,
|
||||||
|
...urlParameters
|
||||||
});
|
});
|
||||||
|
|
||||||
const { RemoteControl,
|
const { RemoteControl,
|
||||||
|
|
Loading…
Reference in a new issue