Skip to content

Commit

Permalink
maintain backward compatible api
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-gavrilescu authored and hristoterezov committed Feb 20, 2020
1 parent 0635f3e commit 58c5204
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions screensharing/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class ScreenShareMainHook {
});

this._screenShareTracker.sharingIdentity = this._identity;
// eslint-disable-next-line no-undef
this._screenShareTracker.loadURL(`file://${__dirname}/screenSharingTracker.html?`);
}
}
Expand Down
12 changes: 8 additions & 4 deletions screensharing/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ class ScreenShareRenderHook {
/**
* Creates a ScreenShareRenderHook hooked to jitsi meet iframe events.
*
* @param {iframe} iframe - The jitsi Meet iframe object. This may seem redundant as we can access it from
* the api object, however we need it here for backwards compatibility as some clients are setup is such a
* way that they may end up calling the old jitsi-meet-electron-utils with the updated api, causing crashes.
* @param {JitsiIFrameApi} api - The Jitsi Meet iframe api object.
*/
constructor(api) {
constructor(iframe, api) {
this._api = api;
this._iframe = this._api.getIFrame();
this._iframe = iframe;

this._onScreenSharingStatusChanged = this._onScreenSharingStatusChanged.bind(this);
this._sendCloseTrackerEvent = this._sendCloseTrackerEvent.bind(this);
Expand Down Expand Up @@ -153,8 +156,9 @@ class ScreenShareRenderHook {
* Initializes the screen sharing electron specific functionality in the renderer process containing the
* jitsi meet iframe.
*
* @param {iframe} iframe - The jitsi Meet iframe object.
* @param {JitsiIFrameApi} api - The Jitsi Meet iframe api object.
*/
module.exports = function setupScreenSharingForWindow(api) {
return new ScreenShareRenderHook(api);
module.exports = function setupScreenSharingForWindow(iframe, api) {
return new ScreenShareRenderHook(iframe, api);
};

0 comments on commit 58c5204

Please sign in to comment.