Bug 226921 - MediaDevices devicechange event loop
Summary: MediaDevices devicechange event loop
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-11 07:59 PDT by Jon Mudrick
Modified: 2022-04-27 05:44 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Mudrick 2021-06-11 07:59:51 PDT
In safari on iOS 14.6, the navigator.mediaDevices devicechange event (https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/devicechange_event) gets called repeatedly as long as a bluetooth headset is connected to the iOS device. The event stops firing as soon as the bluetooth headset is disconnected. Observed with AirPods Pro and Bose QC35 connected to iPhone.

This may have started with the release of iOS 14.5. That's the first time we started hearing customer complaints about airpods with our webRTC implementation.
Comment 1 Radar WebKit Bug Importer 2021-06-11 19:48:16 PDT
<rdar://problem/79228964>
Comment 2 Jon Mudrick 2021-06-16 06:24:45 PDT
For an additional data point - airpods pro only cause this loop when connected and in your ears. When removed from ears (not put back in case yet) the event loop stops.
Comment 3 Jovan Chohan 2021-09-28 10:59:35 PDT
I'm also able to reproduce this error on my iPad mini 4 on iOS 14.8. When I plug in wired headphones on a page that has the users MediaStream from getUserMedia() being displayed, the "devicechange" event is being fired very frequently. When the headphones are unlplugged the "devicechange" event stops firing.
Comment 4 youenn fablet 2022-04-27 05:44:24 PDT
This works for me on iOS 15.5 beta using this fiddle: https://jsfiddle.net/48utwfkh/
Marking as Configuration changed, please reopen otherwise.