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

navigator.getUserMedia still creates webcompat issues #266

Open
karlcow opened this issue Mar 5, 2024 · 6 comments
Open

navigator.getUserMedia still creates webcompat issues #266

karlcow opened this issue Mar 5, 2024 · 6 comments

Comments

@karlcow
Copy link
Member

karlcow commented Mar 5, 2024

What is the issue with the Compatibility Standard?

navigator.getUserMedia has been "removed" from the standard

API WebKit Gecko Blink
navigator.getUserMedia undefined undefined
navigator.webkitGetUserMedia undefined undefined
navigator.mozGetUserMedia undefined undefined
navigator.mediaDevices.getUserMedia

time to time, Safari is getting Web compat reports about breakage because of the lack of webkitGetUserMedia.

The patterns where this is failing are code like:

navigator.getUserMedia =
  navigator.getUserMedia ||
  navigator.webkitGetUserMedia ||
  navigator.mozGetUserMedia ||
  navigator.msGetUserMedia;

(nb: thanks @gsnedders for digging the links)

@miketaylr
Copy link
Member

time to time, Safari is getting Web compat reports about breakage because of the lack of webkitGetUserMedia.

@karlcow did Safari expose this historically? Or was it just never implemented?

navigator.getUserMedia has been "removed" from the standard

Interesting... I would expect non-zero breakage as a result (based on nothing but vibes and intuition).

@gsnedders
Copy link
Member

time to time, Safari is getting Web compat reports about breakage because of the lack of webkitGetUserMedia.

@karlcow did Safari expose this historically? Or was it just never implemented?

BCD claims Safari 11–11.1 did: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia#browser_compatibility, so removed in Safari 12 (September 2018)

@karlcow
Copy link
Member Author

karlcow commented Mar 6, 2024

ok I was trying to understand the history of the WebKit implementation.
Probably we need to open a bug on the spec https://w3c.github.io/mediacapture-main/
Because WebKit tried to remove it twice and it doesn't seem to work.
And both Blink and Gecko kept the prefixed version.

@karlcow
Copy link
Member Author

karlcow commented Mar 6, 2024

I filed w3c/mediacapture-main#992

@Orphis
Copy link

Orphis commented Mar 6, 2024

There is still some usage of the prefixed APIs, and it's still uncertain if those are caused by code using the deprecated API before the standard one.

There are also issues related to removing it in popular WebRTC libraries detailed here: webrtcHacks/adapter#764

@karlcow
Copy link
Member Author

karlcow commented Mar 7, 2024

to note that there is a Quirk (aka site interventions in Gecko speak) for getUserMedia

https://github.com/WebKit/WebKit/blob/9d57f1f6519a812dda9dbb476a24ce8ed73c976c/Source/WebCore/page/Quirks.cpp#L1039-L1051

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

No branches or pull requests

4 participants