webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.74k stars 5.69k forks source link

navigator.mediaDevices.getUserMedia doesn't work on macos catalyst WKWebView #1627

Closed denmorgenshtern closed 9 months ago

denmorgenshtern commented 9 months ago

I've got the following error on Mac Catalyst WKWebView:

TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia')

macOS 13.5 / 14.0 Safari 17.0

The same app works well on iOS.

I have added native checks for camera and microphone access. If they are not available, I make a request. After both are approved, checkboxes appear in the privacy settings of macOS. However, I still receive the same error. Interestingly, iOS does not have any access checks; the request is automatically initiated, presumably by Safari.

fippo commented 9 months ago

Not an issue with the samples, please file a webkit bug.