WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
231787
Safari local video element pauses after bluetooth audioinput is disconnected
https://bugs.webkit.org/show_bug.cgi?id=231787
Summary
Safari local video element pauses after bluetooth audioinput is disconnected
Venkatesh Devale
Reported
2021-10-14 17:03:10 PDT
Created
attachment 441308
[details]
Details more on manual steps to repro in devtools console Problem: When a bluetooth device is disconnected after getting audio input stream through getUserMedia , I get a “[Error] A MediaStreamTrack ended due to a capture failure" error. If a HTML video element is bound to an active ”videoinput“ media stream, then, the video element automatically pauses as soon as I see above error in browser developer tools console. The issue is observed only on the local HTML video element. In an WebRTC based web application, if this local video stream is being sent to a remote side, the remote HTML video element is not paused and continues to work as expected. Steps to Reproduce: Reproduced on an official WebRTC sample. (Used Safari 15) 1. Connect a bluetooth device, I reproduced using AirPods Pro. 2. Open
https://webrtc.github.io/samples/src/content/devices/input-output/
. 3. Provide permissions to choose media devices. 4. Once demo is working, disconnect the bluetooth device from your macOS menu bar. 5. The video element is paused now and you will see “A MediaStreamTrack ended due to a capture failure” error in browser developer tools console. 6. It does not play unless explicitly play() is called on the HTML video element. Code pen link:
https://codepen.io/venkateshdevale/pen/oNejMKO
Actual Results: The HTML video element pauses when the bluetooth audioinput is disconnected after selection. There is no audio from the audioinput device after error. Expected Results: The HTML video element should continue to play and if we are falling back to a different audioinput device, it should get successfully selected. Build: * macOS Safari Version 15 (16612.1.29.41.4, 16612) * macOS Safari Version 14.1.1 * Safari Technology Preview (Release 133 (Safari 15.4, WebKit 16613.1.2.2)) Additional Notes: * The [Error] A MediaStreamTrack ended due to a capture failure is also observed in few more WebRTC official samples when you simply switch the “audioinput” media devices. *
https://webrtc.github.io/samples/src/content/getusermedia/volume/
* More prominently the issue is happening for AirPods Pro. * Similar error bug:
https://bugs.webkit.org/show_bug.cgi?id=221192
* It does not speak about the local video pause based on bluetooth audioinput disconnection though. * Issue not reproducible in Firefox and Chrome latest versions.
Attachments
Details more on manual steps to repro in devtools console
(74.04 KB, application/pdf)
2021-10-14 17:03 PDT
,
Venkatesh Devale
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Venkatesh Devale
Comment 1
2021-10-19 15:31:42 PDT
We are also finding more prominent failures in Safari 15 with Airpods, where simple selection or re-selection of the audioinput media device (Airpods) fails with the same error, irrespective of your local video is turned on or not. I have put this under additional notes in the first comment. Most of the time, the first selection succeeds, but say you select the mac mic and then re-select Airpods it fails with the error: [Error] A MediaStreamTrack ended due to a capture failure We have not yet found any work around this, so please let us know if we have to provide more information or if you have any suggestions.
Radar WebKit Bug Importer
Comment 2
2021-10-21 17:04:17 PDT
<
rdar://problem/84529041
>
youenn fablet
Comment 3
2021-10-28 07:08:56 PDT
AIUI, the capturing device is not the BT device, but it is just that the BT device gets disconnected. If that is the case, I think this is fixed by
https://bugs.webkit.org/show_bug.cgi?id=231280
.
youenn fablet
Comment 4
2021-10-28 07:10:39 PDT
@Venkatesh, let me know if I misunderstood the issue. If not, I'll dupe the issue.
Venkatesh Devale
Comment 5
2021-10-29 16:37:27 PDT
Thanks for your response. In which specific versions the fix will land, so that I can test it? Also, it is actually not about the bluetooth automatically disconnecting but below two issues: 1. On disconnecting bluetooth device manually, we listen on the disconnected device not available and connect to the available device which on mac is the mac's microphone. But, the switch does not take place and we get the MediaStreamTrack error and then no audioinput is present henceforth. We also stop the tracks on the previous audioinput device before selecting the new one. 2. Now for the second issue, if you have your local video ON, then the local video pauses when the bluetooth device is manually disconnected and we see the same error. “A MediaStreamTrack ended due to a capture failure” I have attached the manual instructions, the official WebRTC sample observations as well as a code pen link for the repro. Please let me know if I can provide more information.
youenn fablet
Comment 6
2023-01-18 06:58:14 PST
Pull request:
https://github.com/WebKit/WebKit/pull/8764
EWS
Comment 7
2023-01-26 01:59:46 PST
Committed
259415@main
(e32bbc1197b1): <
https://commits.webkit.org/259415@main
> Reviewed commits have been landed. Closing PR #8764 and removing active labels.
WebKit Commit Bot
Comment 8
2023-01-26 11:06:18 PST
Re-opened since this is blocked by
bug 251217
youenn fablet
Comment 9
2023-01-27 00:52:46 PST
Pull request:
https://github.com/WebKit/WebKit/pull/9214
EWS
Comment 10
2023-01-27 04:40:20 PST
Committed
259478@main
(616d47c0514e): <
https://commits.webkit.org/259478@main
> Reviewed commits have been landed. Closing PR #9214 and removing active labels.
Venkatesh Devale
Comment 11
2023-02-08 15:17:29 PST
Hello Team, How do we track this bug release? Is there a process to follow to check out in which version this will be released? I just saw 16.3 release notes and it seems to have a bug fix under Media: "Fixed “A MediaStreamTrack ended due to a capture failure” error when selecting bluetooth headphones as an audio input device." Thus, I tried 16.3 Safari browser and it seems upon bluetooth disconnection, I see that the local video element actually is still paused. 1. Could you please provide the version to test the bug fix in if 16.3? 2. Are the release notes pointing to this bug fix or I am mistaken? Sorry for re-opening, I will resolve if this is actually fixed. Thanks, Venkatesh
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug