Package com.opentok.android
Class AudioDeviceManager
- java.lang.Object
-
- com.opentok.android.AudioDeviceManager
-
public class AudioDeviceManager extends java.lang.Object
Use the AudioDeviceManager to set a custom audio device to be used by the app. The audio device manages access to the audio capturing and rendering hardware.You can only define a single audio capture source and rendering target for the app. You cannot set these individually for each publisher and subscriber. You can, however, set the audio bitrate for a published stream using the
PublisherKit.Builder.audioBitrate(int)
method.
-
-
Constructor Summary
Constructors Constructor Description AudioDeviceManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BaseAudioDevice
getAudioDevice()
Gets theBaseAudioDevice
instance.static void
setAudioDevice(BaseAudioDevice device)
Sets the audio device to be used.
-
-
-
Method Detail
-
setAudioDevice
public static void setAudioDevice(BaseAudioDevice device) throws java.lang.IllegalStateException
Sets the audio device to be used.You must call this method before you connect to a session. Additionally, this is a global operation that must persist throughout the lifetime of an application.
If you do not call this method, the app uses the Android device's microphone and speaker.
- Parameters:
device
- TheBaseAudioDevice
interface implementation.- Throws:
java.lang.IllegalStateException
-
getAudioDevice
public static BaseAudioDevice getAudioDevice()
Gets theBaseAudioDevice
instance.- Returns:
- id The
BaseAudioDevice
instance.
-
-