Interface AudioController

    • Method Detail

      • mute

        void mute()
        Mutes audio input.
      • unmute

        void unmute()
        Unmutes audio input.
      • isMute

        boolean isMute()
        Checks whether the microphone is muted.
        Returns:
        true if microphone is muted, false otherwise.
      • enableSpeaker

        void enableSpeaker()
        Enables speaker mode.
      • disableSpeaker

        void disableSpeaker()
        Disables speaker mode.
      • isSpeakerOn

        boolean isSpeakerOn()
        Checks whether the speaker is enabled.
        Returns:
        true if speaker is enabled, false otherwise.
      • setLocalAudioListener

        void setLocalAudioListener​(LocalAudioListener listener)
        Sets a listener for the local audio listener.
        Parameters:
        listener - will be called when the recording is being started, stopped and when new audio buffer is available.
        See Also:
        LocalAudioListener
      • enableAutomaticAudioRouting

        void enableAutomaticAudioRouting​(AudioController.AudioRoutingConfig audioRoutingConfig)

        Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices.

        Priorities are following:
        • Bluetooth (if available and manageBluetoothAudio == true)
        • Wired Headset
        • Default audio device if useSpeakerphone is TRUE or FALSE, or Proximity sensor's based decision (speakerphone / earpiece) if useSpeakerphone is AUTO.
        Default audio device (speakerphone/ earpiece) is set using useSpeakerphone parameter. Throws MissingPermissionException if manageBluetoothAudio is set to true and android.Manifest.permission.BLUETOOTH is not granted.
        Parameters:
        audioRoutingConfig - automatic routing configuration data
        See Also:
        AudioController.AudioRoutingConfig
      • disableAutomaticAudioRouting

        void disableAutomaticAudioRouting()
        Disables automatic audio routing (AAR). When AAR is disabled use AudioController enableSpeaker()/disableSpeaker() to toggle between speakerphone and earpiece.
      • isAutomaticAudioRoutingEnabled

        boolean isAutomaticAudioRoutingEnabled()
        Checks whether the automatic audio routing is enabled.
        Returns:
        true if automatic routing is enabled, false otherwise.