stasel / WebRTC-iOS

A simple native WebRTC demo iOS app using swift
Apache License 2.0
1.1k stars 239 forks source link

Extra sound during video streaming #99

Open Just66 opened 2 years ago

Just66 commented 2 years ago

I saw some issues here concerning sounds and speakers For me speakers were working fine, but there is an issue when I'm trying to run some more audio during outgoing and incoming stream, audio is played in top dynamic for calls I was successful at overriding this behaviour with another AVAudioSession category + mode + overrideOutputAudioPort, it was fine except one thing microphone stopped taking any data, so stream for others was muted

Now I'm digging into Audio Units, and see that it's possible to mix that on low level, but I'm not sure that will work out, and whether I can play the sound along with the main settings not overridding the behaviour of WebRTC-iOS

So the question is don't you have any solutions to run streams and another audio source at the same time from loudspeakers? If not is there possibility to take audio data and do it on my level?

I know it's possible in iOS to mix audios in live session and take video at same time You can even trick that with standard camera and audio

lihhh commented 2 years ago

Bump, ran into the similar problem. on IOS it picks the speaker for me. ideally, if I can have control over which speaker to pick and the audio level overwrite. searching online seems a bit of people have this issue. https://developer.apple.com/forums/thread/657321