AudioInputClient (v2.2)

Hints:

  • iOS specific: because both CameraStreamer and AudioInputClients accessing and mutating shared AVAudioSession instance, it is strongly recommended to mute audio at CameraStreamer instance before calling start method on AudioInputClient instance and unmuting audio at CameraStreamer instance after calling stop method on AudioInputClient instance.
  • iOS specific: you can subscribe to kMuteAudioNotification and kUnmuteAudioNotification notifications and mute/unmute audio on CameraStreamer instance respectively in order to follow recommendation above.

class AudioInputClient

AudioInputClient(AudioInputDelegate delegate, String url);

Constructs AudioInputClient instance.

Bool isRunning;

Returns true if recording and streaming are running.

start();

Starts recording audio and starts streaming the audio frames captured to the url provided.

stop();

Stops recording of audio and stops streaming.

protocol AudioInputDelegate

@optional onStarted();

Will get called when the recording started.

@optional onStopped();

Will get called when recording ended.

@optional onError(MobileSDKError error);

Will be called if there is an error in the streaming process.