From da9e3fb63e39b549c65f3ddeae0ecd8e61185eda Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Wed, 26 Jul 2017 15:44:22 -0500 Subject: [PATCH] feat(external_api): Return external resources for the always on top. --- modules/API/external/external_api.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js index 92d83d18e..8da4efd48 100644 --- a/modules/API/external/external_api.js +++ b/modules/API/external/external_api.js @@ -8,6 +8,10 @@ import { const logger = require('jitsi-meet-logger').getLogger(__filename); +const ALWAYS_ON_TOP_FILENAMES = [ + 'css/alwaysontop.css', 'libs/alwaysontop.bundle.min.js' +]; + /** * Maps the names of the commands expected by the API with the name of the * commands expected by jitsi-meet @@ -207,6 +211,9 @@ export default class JitsiMeetExternalAPI extends EventEmitter { noSSL, roomName }); + this._baseUrl = generateURL(domain, { + noSSL + }); this._createIFrame(height, width); this._transport = new Transport({ backend: new PostMessageTransportBackend({ @@ -245,6 +252,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter { this._frame = this._parentNode.appendChild(this._frame); } + /** + * Returns arrays with the all resources for the always on top feature. + * + * @returns {Array} + */ + _getAlwaysOnTopResources() { + return ALWAYS_ON_TOP_FILENAMES.map( + filename => this._baseUrl + filename + ); + } + /** * Sets the size of the iframe element. *