whatwg / compat

Compatibility Standard
https://compat.spec.whatwg.org/
Other
111 stars 39 forks source link

navigator.getUserMedia still creates webcompat issues #266

Open karlcow opened 6 months ago

karlcow commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

I filed https://github.com/w3c/mediacapture-main/issues/992

Orphis commented 6 months ago

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: https://github.com/webrtcHacks/adapter/issues/764

karlcow commented 6 months ago

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