opentok-ios-sdk-samples icon indicating copy to clipboard operation
opentok-ios-sdk-samples copied to clipboard

setOutputMode

Open tapz opened this issue 7 years ago • 5 comments

In Android one can switch between handset and speakerphone by calling AudioDeviceManager.getAudioDevice().setOutputMode. However, in iOS this requires using a custom audio driver. Why isn't this implemented in the iOS SDK similar to the Android SDK?

tapz avatar Jun 21 '18 12:06 tapz

Were you able to find a better alternative?

MMujtabaRoohani avatar Oct 22 '21 14:10 MMujtabaRoohani

There is no alternative. Just half implemented SDK.

tapz avatar Oct 22 '21 15:10 tapz

Does changing the AVAudioSession category not work? https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616462-defaulttospeaker

abdulajet avatar Oct 26 '21 09:10 abdulajet

It only does if you add a delay between subscriber stream connected and setting the category with options excluding defaultToSpeaker.

MMujtabaRoohani avatar Oct 26 '21 11:10 MMujtabaRoohani

I have had similar issues, I believe it is a limitation on the AVAudioSession side. You can try setting the audiosession to active before hand

abdulajet avatar Oct 27 '21 10:10 abdulajet