Skip to content

Make screen sharing works on Chrome using getDisplayMedia() - #1276

Merged
jryans merged 3 commits into
matrix-org:developfrom
mjattiot:hotfix/screen_sharing
Mar 27, 2020
Merged

jryans merged 3 commits into
matrix-org:developfrom
mjattiot:hotfix/screen_sharing

Conversation

@mjattiot

@mjattiot mjattiot commented Mar 20, 2020 •

Copy link
Copy Markdown
Contributor

Screen sharing has never been working on recent versions of Chrome (fixes element-hq/element-web#6181).

This PR intends to use the new API getDisplayMedia() to make it works on all recent browsers : https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia

Signed-off-by: Maxime Jattiot mjattiot@opensense.fr

Signed-off-by: mjattiot <mjattiot@opensense.fr>
Signed-off-by: mjattiot <mjattiot@opensense.fr>
Signed-off-by: mjattiot <mjattiot@opensense.fr>
@mjattiot
mjattiot force-pushed the hotfix/screen_sharing branch from 0700388 to e251589 Compare March 20, 2020 14:23
@mjattiot
mjattiot marked this pull request as ready for review March 20, 2020 14:23
@turt2live
turt2live requested a review from a team March 20, 2020 15:45
@jryans

jryans commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator

MDN support info is apparently outdated, as it seems Safari 13 on desktop is supported as well.

We should test in all 3 supported browsers as part of the review to be sure it does indeed work.

@turt2live turt2live left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change itself looks fine, and testing it feels non-trivial on all three browsers. https://caniuse.com/#search=getDisplayMedia also says Safari is not supported.

@jryans where are you seeing that it is supported? If it is in fact supported and all the sources are wrong, I'd be inclined to merge this and test it live instead of trying to test it ourselves. This is a low-traffic part of the repo and this is a relatively atomic change to back out.

@turt2live
turt2live requested a review from jryans March 27, 2020 01:06
@mjattiot

mjattiot commented Mar 27, 2020 •

Copy link
Copy Markdown
Contributor Author

Well the function exists on Safari 13:
Screenshot 2020-03-27 at 09 37 42

However I tried to make it works on a console without success, nothing happens when I click:
Screenshot 2020-03-27 at 09 42 22

And it seems Riot on Safari doesn't currently support screensharing anyway ...
Screenshot 2020-03-27 at 09 50 22

Still this feature is a must have for Chrome and supported by Firefox as well. So I campaign for a merge ! :)

@jryans jryans left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah okay, my evidence for Safari was:

Anyway, as already mentioned, we don't support Safari for VoIP today, so there's no regression to worry about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screensharing no longer works in chrome 64

3 participants