mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-05 18:23:41 +02:00
feat: support config overwrite via URL parameters (#594)
Signed-off-by: Christoph Settgast <csett86@web.de>
This commit is contained in:
parent
2baa4b5282
commit
e5d5bcc1db
|
@ -209,6 +209,15 @@ class Conference extends Component<Props, State> {
|
||||||
const roomName = url.pathname.split('/').pop();
|
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 searchParameters = Object.fromEntries(url.searchParams);
|
||||||
|
const hashParameters = url.hash.substring(1).split('&')
|
||||||
|
.reduce((res, item) => {
|
||||||
|
const parts = item.split('=');
|
||||||
|
|
||||||
|
res[parts[0]] = parts[1];
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}, {});
|
||||||
|
|
||||||
const locale = { lng: i18n.language };
|
const locale = { lng: i18n.language };
|
||||||
const urlParameters = {
|
const urlParameters = {
|
||||||
...searchParameters,
|
...searchParameters,
|
||||||
|
@ -221,6 +230,14 @@ class Conference extends Component<Props, State> {
|
||||||
startWithVideoMuted: this.props._startWithVideoMuted
|
startWithVideoMuted: this.props._startWithVideoMuted
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Object.entries(hashParameters).forEach(([ key, value ]) => {
|
||||||
|
if (key.startsWith('config.')) {
|
||||||
|
const configKey = key.substring('config.'.length);
|
||||||
|
|
||||||
|
configOverwrite[configKey] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
configOverwrite,
|
configOverwrite,
|
||||||
onload: this._onIframeLoad,
|
onload: this._onIframeLoad,
|
||||||
|
|
Loading…
Reference in a new issue