compat
compat copied to clipboard
navigator.getUserMedia still creates webcompat issues
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
.
- Gecko Deprecate navigator.mozGetUserMedia(). It didn't happen yet.
- Blink Remove navigator.webkitGetUserMedia, Deprecate navigator.getUserMedia()
- seeAlso WPT for not supporting it
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)
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).
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)
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.
- Apr 2011: Media Stream API: add the getUserMedia method and the Javascript bindings. This was adding in fact
navigator.webkitGetUserMedia
- Some back and forth for implementing, adjustment to match spec changes.
- Apr 2015: Support for
navigator.mediaDevices.getUserMedia()
- Jun 2016: getUserMedia() exposed, but not functional
- Feb 9, 2017:[MediaStream] Remove legacy Navigator.webkitGetUserMedia
- Feb 14, 2017: [MediaStream] add navigator.getUserMedia for compatibility with legacy content
- Aug 2018: Remove WebRTC legacy API implementation
- Mar 2020: navigator.getUserMedia is not available in WKWebView iOS 13.4 beta 4
I filed https://github.com/w3c/mediacapture-main/issues/992
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
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