Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should getDisplayMedia be undefined on platforms with no support? #127

Closed
jan-ivar opened this issue Nov 15, 2019 · 4 comments
Closed

Should getDisplayMedia be undefined on platforms with no support? #127

jan-ivar opened this issue Nov 15, 2019 · 4 comments
Assignees

Comments

@jan-ivar
Copy link
Member

A question came up on stackoverflow: How to detect if screen sharing is supported on a particular browser and platform? Presumably this is to avoid showing users a non-functioning button.

It turns out mobile browsers like Chrome for Android and Firefox for Android define the API surface, but don't actually implement it, instead always rejecting with NotAllowedError.

This defeats feature-detection. Should those browsers instead have left navigator.mediaDevices.getDisplayMedia undefined?

Unlike with camera or microphone (which is detectable today, modulo discussions in w3c/mediacapture-main#612 about maybe lying about this for privacy reasons), this would appear to leak no net fingerprinting surface about a user's system, since sites can already browser-sniff this from the UA string.

@jan-ivar jan-ivar changed the title Should getDisplayMedia be absent on platforms with no support? Should getDisplayMedia be undefined on platforms with no support? Nov 15, 2019
@youennf
Copy link
Collaborator

youennf commented Nov 28, 2019

It seems like a Chromium bug (is there a bug filed there?).
I am not sure the spec should say anything here.

@aboba
Copy link
Contributor

aboba commented Mar 20, 2020

@jan-ivar Agree with Youenn that this is a bug. Support for feature detection is recommended in the Client-side API Design Principles. In this case, I see no reason to circumvent that recommendation.

@LukasKalbertodt
Copy link

There is a bug report for Chromium. I also just created a bug report for Firefox.

@jan-ivar
Copy link
Member Author

Bugs have been filed on implementations so we can close this.

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

No branches or pull requests

4 participants