compat icon indicating copy to clipboard operation
compat copied to clipboard

navigator.getUserMedia still creates webcompat issues

Open karlcow opened this issue 11 months ago • 6 comments

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)

karlcow avatar Mar 05 '24 01:03 karlcow

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).

miketaylr avatar Mar 05 '24 13:03 miketaylr

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)

gsnedders avatar Mar 05 '24 16:03 gsnedders

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 avatar Mar 06 '24 02:03 karlcow

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

karlcow avatar Mar 06 '24 02:03 karlcow

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

Orphis avatar Mar 06 '24 16:03 Orphis

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

karlcow avatar Mar 07 '24 06:03 karlcow