In Safari on macOS 15.1 Beta when audio track is acquired in Safari it always ended immediately with error 'A MediaStreamTrack ended due to a capture failure'. Could be reproduced using https://webrtc.github.io/samples/src/content/getusermedia/audio/
<rdar://problem/85729477>
We are also encountering this error with Safari 15.1 on MacOS. For us, it seems to only occur when the application makes use of the AudioContext API. The example provided by Vadim doesn't reproduce this error for us. This is a significant problem, as our application includes WebRTC based video-chat and outputs dynamic sounds. In Chrome / Firefox and Safari versions pre 15, this issue doesn't occur at all. It seems that there are other bug reports in Bugzilla which may be related to this one, but it's really hard to pin point exactly.. As more users are gradually updating their Safari version to 15.1, this issue is affecting more and more users.
A lot of our customers are also starting to see this error. For us, it happens on USB and Bluetooth devices and when the application uses Web Audio API.
Safari 15.3 bug still present. Can riproduce even without webAudio APIs. Steps to reproduce: - connect bluetooth headphones - go to system preferences, audio, input. Set the default input device as the internal microphone instead of Bluetooth device. - open: https://jsfiddle.net/bkwLzcjo/1/ - allow permission to capture and inspect console - select from the dropdown menu the bluetooth input - "A MediaStreamTrack ended due to a capture failure" appears after few seconds in console It's P2 an adequate priority? If we add audioContexts to the page this became even more messy and broken and the majority of conference apps uses the audioContext to display audioLevel...
Possibly dupe or related to https://bugs.webkit.org/show_bug.cgi?id=221192. I guess in this case a PC isn't involved so might be a separate issue.
Happening to us regularly now with USB audio devices, Safari is (once again) basically unusable for WebRTC.
I get the same error on Safari on both Intel and iPhone with this app https://mdn.github.io/web-dictaphone/
Any updates on this? We are still facing this problem in our webrtc app? For us, capturing an audio device is failing when AudioContext API is used in Safari 15.x.
The issue is fixed for me in Safari 15.6
Although the error message is no longer being reported, switching audio devices still does not work. If you open the audio device you want, it now will work correctly with the device chosen (this wasn't working before). But if you then close that and try to open a different device, things still fall apart.
Are you sure about that? I tested it and was able to change devices.
After some more testing, it turns out that changing devices *does* work. The problem is that when I have bluetooth headphones connected, the gain on the internal mic is dropping to almost zero. This only happens in Safari (I can switch audio input no problem in Firefox, for example, and the gain stays correct). This seems to be a new problem, in that the internal mic gain is super low even if that's the only device I ever use. So it's not related to switching.
(In reply to Joshua Smith from comment #12) > After some more testing, it turns out that changing devices *does* work. The > problem is that when I have bluetooth headphones connected, the gain on the > internal mic is dropping to almost zero. This only happens in Safari (I can > switch audio input no problem in Firefox, for example, and the gain stays > correct). > > This seems to be a new problem, in that the internal mic gain is super low > even if that's the only device I ever use. So it's not related to switching. This seems like a different bug, could you file a bug? Also, which Safari version are you using?
I'll file a bug. I'm using Version 15.6 (16613.3.9.1.7, 16613) on MacOS 11.6.7
Here's the bug, including a test app to demonstrate it. https://bugs.webkit.org/show_bug.cgi?id=243260
This bug is definitely NOT resolved! I'm still encountering this bug on Safari Version 16.0 (17614.1.25.9.10, 17614). When selecting bluetooth headphones (WH-1000XM2) as audio input device, I'm getting "A MediaStreamTrack ended due to a capture failure". I was able to reproduce it in Google Meet. This bug makes using Safari + bluetooth headphones for video calls impossible!
As Francesco Durighetto described, this error occurs when the OS default input device is set at anything other than bluetooth headphones. Still, this issue doesn't occur using Chrome or Firefox. Only Safari..
@Tal Bar, can you file a new bug? And mention the macOS version (plus ideally send me a sysdiagnose to me at youenn@apple.com)