Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiet audio from speakerphone on iOS 15.1 #1847

Closed
4 tasks done
jonathan-emed opened this issue Dec 3, 2021 · 2 comments
Closed
4 tasks done

Quiet audio from speakerphone on iOS 15.1 #1847

jonathan-emed opened this issue Dec 3, 2021 · 2 comments
Labels
audio Issues related to impaired audio experience - quality related or not being able to get audio Browser Bug

Comments

@jonathan-emed
Copy link

jonathan-emed commented Dec 3, 2021

What happened and what did you expect to happen?

When joining meetings using https://meeting.anycompany.xyz/ users on iOS 15.1 experience substantially quieter volume than expected.

AWS Support Ticket 9282150361

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

Basically, there exists a bug introduced into iOS 15.1 either in echo/noise suppression mechanism which causes all audio emitted by the browser to become quiet after the microphone is requested and accepted.

See the reproduction steps.

What we are internally experimenting with is creating an audio gain node for iOS 15.1 devices ONLY to force the sound from the Chime meeting to be louder to compensate for the WebKit bug in iOS 15.1.

Here is a snipped of the example:

audioRef = React.createRef<HTMLAudioElement>();
const browser = new DefaultBrowserBehavior();
if (browser.hasWebKitWebRTC() && browser.version() == "15.1.0") {
    const audioCtx = DefaultDeviceController.getAudioContext();
    const src = audioCtx.createMediaElementSource(this.audioRef.current)
    const gainNode = audioCtx.createGain();

    gainNode.gain.value = 5;
    
    src.connect(gainNode);
    
    //should I create a new destination stream?  
    gainNode.connect(audioCtx.destination);  
}
this.meetingSession.audioVideo.bindAudioElement(this.audioRef.current);

If this kind of workaround could be implemented in the SDK, it would save a lot of customers problems until we stop seeing 15.1 devices in the wild.

Have you reviewed our existing documentation?

Reproduction steps

  1. Get your iPhone with iOS 15.1 out
  2. Turn your audio to 100%
  3. Goto https://ashishanand26cs.github.io/
  4. DO NOT ALLOW MICROPHONE ACCESS
  5. Tap on the white canvas of the screen, a sound should trigger. Make a mental assessment of the volume.
  6. Refresh the page
  7. ALLOW MICROPHONE ACCESS
  8. Tap on the white canvas of the screen, the sound should be much quieter.

When joining a call using https://meeting.anycompany.xyz/ the same issue happens.

Amazon Chime SDK for JavaScript version

2.23.0

What browsers are you seeing the problem on?

iOS Safari

Browser version

15.1

Meeting and Attendee ID Information.

No response

Browser console logs

None

@haifengx
Copy link
Contributor

haifengx commented Dec 3, 2021

Hi @jonathan-emed,

Thanks for reporting the issue. Can you confirm if this issue is only reproducible on iOS 15.1? I tested on an iPhone 7 Plus running iOS 14.0 and the issue is reproducible for me. I'm able to reproduce the issue with a bluetooth headset as well.

Reproduction steps in Amazon Chime SDK demo app:

  1. Join a meeting at https://meeting.anycompany.xyz/
  2. DO NOT ALLOW MICROPHONE ACCESS
  3. Press "Test Speaker" button in the device preview page and record volume
  4. Refresh and this time ALLOW MICROPHONE ACCESS on device preview page
  5. Press "Test Speaker" button and notice the the volume drop compare to Step 3

About iOS 15.2 Beta 4

According to this Twilio issue the bug seems fixed in iOS 15.2 beta 4: twilio/twilio-video.js#1586 (comment), but after upgrading one testing device to iOS 15.2 beta 4, the issue is still reproducible for me, with both https://ashishanand26cs.github.io/ and https://meeting.anycompany.xyz/

None of the two related webkit bug reports are marked as fixed yet so it's likely that the Twilio comment is not true:
https://bugs.webkit.org/show_bug.cgi?id=218012
https://bugs.webkit.org/show_bug.cgi?id=230902

About mono vs. stereo

I tested with https://demo.millicast.com/ mentioned in https://bugs.webkit.org/show_bug.cgi?id=230902#c72 and the issue is still reproducible:

Repro step:

  1. Start a broadcast session on a different device (could be a desktop browser)
  2. Copy and paste the viewer URL and open in on the iOS testing device
  3. Make some sound and record the volume
  4. Visit https://demo.millicast.com/ on the iOS testing device, accept the permission popup to access microphone and camera
  5. Reload the viewer URL mentioned in Step 2
  6. Make some sound and notice the volume drop compare to Step 3

This is reproducible on both iOS 15.1 and iOS 15.2 Beta 4.

Thanks,
-Haifeng

@jing-chen1 jing-chen1 added the Bug Something isn't working label Dec 13, 2021
@ltrung ltrung added Browser Bug and removed Bug Something isn't working labels Dec 20, 2021
@ltrung
Copy link
Contributor

ltrung commented Dec 20, 2021

It sounds like the same as the one documented in the known issue thread #1059:

Audio volume is low in iOS 15 as the audio seems to be routed to earpiece audio output instead of speaker (Safari bug).

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

@ltrung ltrung closed this as completed Dec 20, 2021
@vidya-mohan vidya-mohan added the audio Issues related to impaired audio experience - quality related or not being able to get audio label Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Issues related to impaired audio experience - quality related or not being able to get audio Browser Bug
Projects
None yet
Development

No branches or pull requests

5 participants