Bug 204625 - iPhone X GSM, XS/XS Max in Safari using webRTC is transmitting clicking sound
Summary: iPhone X GSM, XS/XS Max in Safari using webRTC is transmitting clicking sound
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-26 10:13 PST by aman.khangura
Modified: 2021-09-07 16:11 PDT (History)
4 users (show)

See Also:


Attachments
iPhone XR in the WebRTC-based web application (238.95 KB, audio/x-m4a)
2020-08-06 18:30 PDT, Kyu Simm
no flags Details
iPhone Xs in the AppRTC demo. Note that the noise starts to occur at 0:07, but it's much quiter than XR. (1.61 MB, video/quicktime)
2020-08-06 18:31 PDT, Kyu Simm
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description aman.khangura 2019-11-26 10:13:39 PST
iPhone X GSM, XS/XS Max in Safari.

FINDINGS
The issue is isolated to the iPhone X GSM, iPhone XS/XS Max in Safari.  We validated this through reported user issues as well as our testing.  We were unable to recreate the issue with iPhone 6, 7, or 8.  We cannot eliminate the iPhone 11 as we do not have one to test with nor have we seen any reported issues from users with an iPhone 11.  We will watch to see if any reports come in.
Adding a headset eliminated the clicking on the call for all users except the user on the iPhone XS.  I could still hear the clicking, but because I was on a headset that clicking was not rebroadcast to the meeting.
Muting the iPhone XS eliminated the clicking in the meeting, but not to the audio heard by the iPhone XS user. 
We also recreated the issue where the volume is turned all the way up but the sound is too quiet to hear.  We have received multiple reports of this issue from users.  I was able to restore normal sound by muting and unmuting.  This reset the volume and restored it to full volume.  Again this is isolated to iPhone X GSM, XS/XS Max in Safari.  No reports have come in from other model iPhones.
We were able to recreate the issues in the Pexip Native Web App.  This isolates the issue outside of the IVVR Application, but does not indicate exact root cause.
Comment 1 Radar WebKit Bug Importer 2019-11-27 00:17:56 PST
<rdar://problem/57501347>
Comment 2 youenn fablet 2019-11-27 00:21:19 PST
Hi aman,

Is there a way to get access to the repro case.
You can directly send me instruction if you do not want to provide this information publicly.

It would be interesting to identify whether the issue lies in capture, rendering or the peer connection pipeline.
Comment 3 youenn fablet 2020-05-14 02:18:00 PDT
The audio too quiet is probably bug 208134.
Comment 4 Kyu Simm 2020-08-06 18:30:36 PDT
Created attachment 406144 [details]
iPhone XR in the WebRTC-based web application
Comment 5 Kyu Simm 2020-08-06 18:31:53 PDT
Created attachment 406145 [details]
iPhone Xs in the AppRTC demo. Note that the noise starts to occur at 0:07, but it's much quiter than XR.
Comment 6 Kyu Simm 2020-08-06 18:33:11 PDT
Problem:
In the WebRTC-based web applications with AudioContext, peers can hear clicking noise from iPhone X devices.

Repro steps in WebRTC-based web applications:
1. PeerA joins the session in iOS Safari on any iPhone X device.
2. PeerB joins the same session in any other browser and device. PeerB doesn't hear any clicking noise from PeerA.
3. PeerA creates an instance of AudioContext.
4. PeerB starts to hear the clicking noise from PeerA.

Repro steps in the AppRTC demo (from WebRTC https://github.com/webrtc/apprtc):
1. PeerA opens https://appr.tc/ in iOS Safari on any iPhone X device.
2. PeerA enters a room name and joins the room.
3. PeerB opens https://appr.tc/ in any other browser and device.
4. PeerB joins the same room.
5. PeerA and PeerB can see and hear each other. PeerB won't hear any clicking noise because the AppRTC demo doesn't create an AudioContext instance (as of 2020-08-04).

> Go to step 10 if the Web Inspector is already set up for iOS Safari.
6. PeerA enables “Web Inspector” under iOS Safari => Advanced settings
7. PeerA connects the iPhone X device to the macOS Safari 13.
8. PeerA opens the Advanced tab in the Safari Preferences and enables "Show Develop menu in menu bar."
9. PeerA chooses the AppRTC demo under the Develop menu. PeerA can use the Web Inspector on the AppRTC page running on the iOS Safari.

10. PeerA opens the Console tab in the Web Inspector and creates an instance of AudioContext.
e.g. const audioContext = new (window.AudioContext || window.webkitAudioContext)();

11. PeerB starts to hear the clicking noise from PeerA.

Notes:
- Tested on iPhone Xs (iOS 13.5.1) and iPhone XR (iOS 13.5). iPhone XR produces much louder noise.

- The clicking noise continues even after closing the audio context.
e.g. audioContext.close()

- The clicking noise continues even after refreshing the page. In iOS Safari, you can refresh the page by tapping the refresh button at the URL bar.

- The clicking noise disappears after opening the WebRTC-based application in a new tab.

- The clicking noise disappears after muting the microphone but comes back after unmuting it.
e.g. MediaStreamTrack.enabled = false

Two attached files:
- clipping-noise-from-iphone-xr.m4a: iPhone XR in the WebRTC-based web application

- clipping-noise-from-iphone-xs.mov: iPhone Xs in the AppRTC demo. Note that the noise starts to occur at 0:07, but it's much quiter than XR.
Comment 7 youenn fablet 2020-08-25 11:31:13 PDT
Hi Kyu, were you able to test the latest iOS 14 betas?
Is it still reproducing there?
Comment 8 Kyu Simm 2020-09-29 13:32:13 PDT
Hi Youenn Fablet,

I confirmed that the clicking sound doesn't occur anymore in iOS 14.

In iOS 13, iPhone XR made a noticeable clicking noise when using the AudioContext API. In iOS 14, I couldn't hear that noise.

Thank you,
Kyu