fix(alwaysontop): URLs for the additionally loaded resources.
This commit is contained in:
parent
aec22b8ed9
commit
eb30ea9693
|
@ -215,7 +215,6 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||||
noSSL,
|
noSSL,
|
||||||
roomName
|
roomName
|
||||||
});
|
});
|
||||||
this._baseUrl = `${noSSL ? 'http' : 'https'}://${domain}/`;
|
|
||||||
this._createIFrame(height, width);
|
this._createIFrame(height, width);
|
||||||
this._transport = new Transport({
|
this._transport = new Transport({
|
||||||
backend: new PostMessageTransportBackend({
|
backend: new PostMessageTransportBackend({
|
||||||
|
@ -261,8 +260,21 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||||
* @returns {Array<string>}
|
* @returns {Array<string>}
|
||||||
*/
|
*/
|
||||||
_getAlwaysOnTopResources() {
|
_getAlwaysOnTopResources() {
|
||||||
|
const iframeWindow = this._frame.contentWindow;
|
||||||
|
const iframeDocument = iframeWindow.document;
|
||||||
|
let baseURL = '';
|
||||||
|
const base = iframeDocument.querySelector('base');
|
||||||
|
|
||||||
|
if (base && base.href) {
|
||||||
|
baseURL = base.href;
|
||||||
|
} else {
|
||||||
|
const { protocol, host } = iframeWindow.location;
|
||||||
|
|
||||||
|
baseURL = `${protocol}//${host}`;
|
||||||
|
}
|
||||||
|
|
||||||
return ALWAYS_ON_TOP_FILENAMES.map(
|
return ALWAYS_ON_TOP_FILENAMES.map(
|
||||||
filename => this._baseUrl + filename
|
filename => (new URL(filename, baseURL)).href
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue