Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add support for Jitsi screensharing in electron app #1355

Merged
merged 6 commits into from
Sep 25, 2017

Conversation

superdump
Copy link
Contributor

No description provided.

if (event.data.widgetAction === 'jitsi_iframe_loaded') {
const iframe = this.refs.appFrame.contentWindow
.document.querySelector('iframe[id^="jitsiConferenceFrame"]');
PlatformPeg.get().setupScreenSharingForIframe(iframe);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method should exist in all platforms, so impl in BasePlatform as a no-op so other platforms inherit it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it did, you wouldn't need the isElectron check above :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbkr - which is preferred? Implement the method in all platforms and just leave it as a stub in every platform other than electron? I would guess so. Alternatively checking if the function exists and is a function could be a compromise...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbkr says the former.

event.origin = event.originalEvent.origin;
}

if (this.state.widgetUrl.indexOf(event.origin) === -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this looks for the widget url anywhere rather than just at the start? Granted it it seems unlikely that you'd have a malicious origin hanging out in the widget url somewhere, but still.

Copy link
Member

@t3chguy t3chguy Sep 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/me points at !this.state.widgetUrl.startsWith(event.origin)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

if (event.data.widgetAction === 'jitsi_iframe_loaded') {
const iframe = this.refs.appFrame.contentWindow
.document.querySelector('iframe[id^="jitsiConferenceFrame"]');
PlatformPeg.get().setupScreenSharingForIframe(iframe);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it did, you wouldn't need the isElectron check above :)

@ara4n
Copy link
Member

ara4n commented Sep 17, 2017

@superdump please can you pick up the review bits & bobs here so we can merge it? O:-)

Copy link
Contributor

@rxl881 rxl881 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants