Bug 237203
Summary: | Bluetooth headphone stream can't be recaptured after AudioContext | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mike Thomas <michaelgeorge.thomas> |
Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | webkit-bug-importer, youennf |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 15 | ||
Hardware: | Mac (Intel) | ||
OS: | macOS 11 |
Mike Thomas
It appears that AudioContext is not releasing Bluetooth headphones when a stream is destroyed.
The console logs an error when trying to re-use the headphones to get an audio stream: A MediaStreamTrack ended due to a capture failure
I have detailed steps to reproduce in a modified webrtc sample here.
https://github.com/webrtc/samples/pull/1526
It basically creates an AudioContext for a stream from headphones, then changes the audio input device to internal mic and then back to headphones, at which point the capture fails.
This bug suggests it can be solved by closing the AudioContext:
https://bugs.webkit.org/show_bug.cgi?id=23635
However, the AudioContext doc recommends using a single AudioContext instance for multiple nodes, and therefore closing a whole context to release the hardware from one node is not a viable solution: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext
Note that this issue is not present in other browsers, nor in safari with non-bluetooth devices.
A colleague was unable to reproduce with AirPods but we were able to reproduce using Sony WH-1000XM3 and Bose NC700 headphones.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/89479520>
youenn fablet
I wonder whether this is https://bugs.webkit.org/show_bug.cgi?id=231280.
I am not able to reproduce on a recent safari build.
On which version can you reproduce? Is it also reproducing in STP?
Mike Thomas
I was using 15.0.
You could be right, I am unable to repro in 15.4 beta release.
youenn fablet
Marking as configuration changed