Open yokurin opened 3 years ago
It maybe a bug of WebAudio and WebRTC API using together in the latest iOS Safari. We are trying to find out the reason.
I have what I think is the same issue but I had a very simple way to demonstrate it.
<!DOCTYPE html>
<html lang="en">
<body>
<audio id="audio-test">
<source src="https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3" />
</audio>
<button onclick="navigator.mediaDevices.getUserMedia({ audio: true });">Capture microphone</button>
<button onclick="document.getElementById('audio-test').play();">Play sound</button>
<button onClick="import('https://download.agora.io/sdk/web/AgoraRTC_N.js')">Load Agora NG SDK</button>
<button onClick="import('https://cdn.agora.io/sdk/release/AgoraRTCSDK-3.2.3.js')">Load Agora 3 SDK</button>
</body>
</html>
1, Load that page in Safari on iOS 14.2.
With Agora NG SDK loaded the sound plays fine unless the microphone is also captured. Apparently something Agora SDK does on load together with microphone capture breaks sound playback.
Clicking "Load Agora 3 SDK" button momentarily pauses the sound, but then it resumes fine.
This appears to confirm something different that NG SDK does on initialisation compared to v3 that is breaking audio playback.
(btw if you play the sound first, then capture the microphone, the sound quality changes. I believe this is related to https://bugs.webkit.org/show_bug.cgi?id=211959)
I have the same issue. Fix it, please!
It's log from safari. multiple logs about "rebuild web audio" - every 4 seconds. And then I tried to play a track... and multiple resume success logs in onetime
It's a very interesting part of code. But it could be a root of the problem.
Recursive call via autoclick (it's part of code from AgoraWebSDK_N-v4.2.1-0-gf505b57):
Describe the bug
I only use voice call. I created 1to1 voice call system in web page with the sdk agora-rtc-sdk-ng (v4.1.1). This based on a code in a tutorial page of it.
If the caller or callee is iOS 14.2, the audio is interrupted and cannot be heard well. In order to isolate the problem, I tested it with 3.x and 4.x in iOS14.2 This audio bug occurred only in 4.x.
I used a simple demo. 3.x demo:https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/ 4.x demo:https://agoraio-community.github.io/AgoraWebSDK-NG/demo/basicVideoCall/index.html
SDK Logs
Platform and Browser: iOS14.2 Safari
SDK Version: 4.1.1
To Reproduce
Steps to reproduce the behavior: