Bug 187633

Summary: iOS 12 beta 3 doesn't send audio to remote peer
Product: WebKit Reporter: Chad Phillips <webkit>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Blocker CC: ben.browitt, eric.carlson, hello, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: Other   

Description Chad Phillips 2018-07-12 22:04:37 PDT
Steps to reproduce:

1. Visit https://staging-connect.circleanywhere.com/public/webrtc-test/#ios-12-missing-audio in a desktop browser
2. Visit the same link on a device running iOS 11.4.1, notice that both peers receive audio from the other
3. Close up browser from step 1, then reopen to same page
4. Visit the same link on a device running iOS 12 beta 3, notice that the iOS device receives audio from the browser peer, but the browser does not receive audio from the iOS peer.

Another illustrative test:
1. Visit https://connect.circleanywhere.com/orientation/connectivity-check?stats-collection-length=100000 from an iOS 11.4.1 device
2. Log in with any Google account
3. Click 'Next' to start the connectivity test
4. Notice 'Audio bytes sent' under the 'Main room' heading shows audio data being sent from the iOS device (gathered from the getStats() method on the peer)
5. Repeat steps 1-3 from an iOS 12 beta 3 device
6. Notice 'Audio bytes sent' under the 'Main room' heading shows NO audio data being sent from the iOS device
Comment 1 Radar WebKit Bug Importer 2018-07-13 07:13:52 PDT
<rdar://problem/42164992>
Comment 2 Chad Phillips 2018-07-14 09:48:32 PDT
Note that the test case has been moved to this location:

https://staging-connect.circleanywhere.com/public/ios/no-audio-sent-to-peer-bug/#ios-12-missing-audio

Also important: close up all browser windows between test runs -- the test case is very simple and doesn't handle page refreshes.
Comment 3 Chad Phillips 2018-07-18 13:11:03 PDT
Note that this bug is still an issue on iOS Beta 4. WebRTC will be virtually unusable until it is fixed.
Comment 4 youenn fablet 2018-07-18 15:35:04 PDT
Hi Chad,
Is it working for MacOS using latest STP?
One difference that happened between iOS11.41. and iOS12 is that we disabled legacy APIs, for instance callback APIs are no longer supported.
It seems your example is using such legacy APIs.
Could you try to update your test?
Comment 5 Chad Phillips 2018-07-20 20:38:43 PDT
@youenn, on further inspection, it's not even necessary to involve peer connections. The following test case is dead simple: getUserMedia request for audio/video, which is then placed into an unmuted video element. All mic input should be heard on the audio output of the device:

https://staging-connect.circleanywhere.com/public/ios/gum-no-audio-captured/

Tested as successfully working on desktop Chrome, Firefox, Opera, Safari Technology Preview, on mobile Chrome, Firefox, and Opera, and on an iPad Mini 3  and iPhone 6 both running iOS 11.4.1.

It fails to work on both the iPhone 6 and iPad Mini 3 running iOS 12 Beta 4.

Can you confirm?
Comment 6 Chad Phillips 2018-07-21 13:30:30 PDT
@youenn, also, to answer your other question, after updating the legacy WebRTC API calls in my peer connection test case, I can confirm it works in both latest Safari Technology Preview and iOS 11.4.1, and does NOT work in iOS 12 Beta 4.
Comment 7 Chad Phillips 2018-07-31 06:00:42 PDT
This is still an issue on iOS 12 Beta 5. The simple use cases I've provided work everywhere (including iOS 11.4.1) except for iOS Beta 12.

As it stands now, a major new feature introduced in iOS 11 is badly broken in iOS 12.
Comment 8 Ben 2018-08-03 03:30:51 PDT
Chrome doesn't receive audio from Safari in the following demos:
https://appr.tc/
https://janus.conf.meetecho.com/audiobridgetest.html

iOS 11.4.1 = Good
iOS 12 Beta 4 = Bad
Comment 9 Chad Phillips 2018-08-06 18:00:02 PDT
This is still an issue on iOS 12 Beta 6.
Comment 10 youenn fablet 2018-08-13 13:10:42 PDT
(In reply to Chad Phillips from comment #9)
> This is still an issue on iOS 12 Beta 6.

I tried both appr.tc and meetecho between a recent iOS build and Google Chrome on a Mac. In both cases, this works fine for me.

Chad, I am not sure what the issue you are encountering is.
For appr.tc, are you getting video but no audio?
Comment 11 Chad Phillips 2018-08-13 15:55:04 PDT
I've confirmed this issue is resolved is iOS Beta 7 for both of my posted test cases, and it also works on appr.tc.

Seeing as my test cases haven't changed, my assumption is that it was fixed somewhere between Beta 6 and Beta 7.

Pretty sure we can close this issue now.
Comment 12 Neil Kinnish 2018-09-19 02:58:40 PDT
I believe there is a related issue in the public iOS 12 release.

https://bugs.webkit.org/show_bug.cgi?id=189713

@youenn fablet: is this just an issue for audiocontext?