Bug 271313 - disconnecting bluetooth device rendered in DOM breaks video track
Summary: disconnecting bluetooth device rendered in DOM breaks video track
Status: RESOLVED DUPLICATE of bug 270522
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 17
Hardware: Mac (Apple Silicon) macOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-20 06:36 PDT by Pontus Fagerström
Modified: 2024-08-05 21:55 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pontus Fagerström 2024-03-20 06:36:58 PDT
When a bluetooth device, being rendered in DOM in an HTMLAudioElement, is removed it breaks video track, obtained from navigator.mediaDevices.getUserMedia().

Reproduce like this:
1. https://webrtc.github.io/samples/src/content/devices/input-output/
2. Use bluetooth microphone (I tested with AirPods A2031 and Sennheiser Momentum 3, version 96.8.3)
3. Make the device disconnect from the computer (I put the Airpods back in the case / turned off the Sennheiser Momentum 3 headphones)
4. See the video image freeze

When I reproduce locally in a small lab/experiment project the video tile turns black instead of freezing.
I've tested using RTCPeerConnections and on the remote end the incoming video bitrate drops and the video tile turns black.

If you do the same thing with an audio device connected via USB the video is not affected.

If you don't render the audio in DOM the video is not affected when the bluetooth device is disconnected.

I render it like this:
1. create a HTMLAudioElement
2. create a MediaStream
3. add the audio track to the MediaStream
4. do audioElement.srcObject = stream
Comment 1 Pontus Fagerström 2024-03-20 06:55:47 PDT
It does not seem to matter if the video and audio tracks were obtained in the same or in separate getUserMedia calls.
Comment 2 youenn fablet 2024-03-22 09:23:10 PDT
I believe this is fixed in bug 270522.
Please reopen otherwise.

*** This bug has been marked as a duplicate of bug 270522 ***
Comment 3 Pontus Fagerström 2024-08-05 21:55:44 PDT
I understand this might not be the best place to ask, but I'm struggling to find documentation.

The issue seems to be fixed in Safari technology preview Release 200 (Safari 18, Webkit 19620.1.1) but not in recently released Safari 17.6 on Sonoma 14.6.

The PR that should fix it was merged in March https://github.com/WebKit/WebKit/pull/25487.

How do I learn when the PR that was merged is included in a specific Safari version?