Bug 237203

Summary: Bluetooth headphone stream can't be recaptured after AudioContext
Product: WebKit Reporter: Mike Thomas <michaelgeorge.thomas>
Component: WebRTCAssignee: 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
Reported 2022-02-25 05:19:23 PST
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
Radar WebKit Bug Importer
Comment 1 2022-02-25 09:57:23 PST
youenn fablet
Comment 2 2022-03-02 06:05:56 PST
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
Comment 3 2022-03-03 08:33:58 PST
I was using 15.0. You could be right, I am unable to repro in 15.4 beta release.
youenn fablet
Comment 4 2022-03-07 11:36:55 PST
Marking as configuration changed
Note You need to log in before you can comment on or make changes to this bug.