Switch to named object
parent
af97ec57d0
commit
92251316a3
|
@ -432,7 +432,7 @@ export default class WidgetUtils {
|
||||||
|
|
||||||
if (app.type === 'jitsi') {
|
if (app.type === 'jitsi') {
|
||||||
console.log("Replacing Jitsi widget URL with local wrapper");
|
console.log("Replacing Jitsi widget URL with local wrapper");
|
||||||
app.url = WidgetUtils.getLocalJitsiWrapperUrl(true);
|
app.url = WidgetUtils.getLocalJitsiWrapperUrl({forLocalRender: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
app.url = encodeUri(app.url, params);
|
app.url = encodeUri(app.url, params);
|
||||||
|
@ -474,7 +474,7 @@ export default class WidgetUtils {
|
||||||
return encodeURIComponent(`${widgetLocation}::${widgetUrl}`);
|
return encodeURIComponent(`${widgetLocation}::${widgetUrl}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getLocalJitsiWrapperUrl(forLocalRender = false) {
|
static getLocalJitsiWrapperUrl(opts: {forLocalRender?: boolean}) {
|
||||||
// NB. we can't just encodeURIComponent all of these because the $ signs need to be there
|
// NB. we can't just encodeURIComponent all of these because the $ signs need to be there
|
||||||
const queryString = [
|
const queryString = [
|
||||||
'conferenceDomain=$domain',
|
'conferenceDomain=$domain',
|
||||||
|
@ -486,7 +486,7 @@ export default class WidgetUtils {
|
||||||
].join('&');
|
].join('&');
|
||||||
|
|
||||||
let currentUrl = window.location.href.split('#')[0];
|
let currentUrl = window.location.href.split('#')[0];
|
||||||
if (!currentUrl.startsWith("https://") && !forLocalRender) {
|
if (!currentUrl.startsWith("https://") && !opts.forLocalRender) {
|
||||||
// Use an external wrapper if we're not locally rendering the widget. This is usually
|
// Use an external wrapper if we're not locally rendering the widget. This is usually
|
||||||
// the URL that will end up in the widget event, so we want to make sure it's relatively
|
// the URL that will end up in the widget event, so we want to make sure it's relatively
|
||||||
// safe to send.
|
// safe to send.
|
||||||
|
|
Loading…
Reference in New Issue