[[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:&error];
This approach is suggested oftenly, but it does not work for me:
audioManager.setSpeakerphoneOn(on);
Do you know how I can change the speaker output?
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/ae17bc1d-07df-465e-abf6-0f93a7c715bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
We have not added these parts to the native audio layer in Android since it works better to leave it for theapplication level.One (rather complex since it also support BT) example in AppRTCMobile can be found here and there is a UI in the demo clientwhere you can force usage of the speaker phone. Note that the demo also uses a proximity sensor whichshould switch between earpiece and speakerphone automatically.But to summarize: using the setSpeakerphoneOn() API on the AudioManager is the correct approach.
On Sat, Jan 28, 2017 at 12:57 PM, Lars Bork <polarapps...@gmail.com> wrote:
Hello,I would like to be able to set the speaker that should be used to output WebRtc audio streams. Right now the earpiece is always used, but sometimes I want to listen to the stream loudly (e.g. in a car).On iOS I can do this by manipulating the AVAudioSession:[[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:&error];
This approach is suggested oftenly, but it does not work for me:
audioManager.setSpeakerphoneOn(on);
Do you know how I can change the speaker output?
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.