Public API (v2.2)

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.

MobileSDKError (v2.2)

class MobileSDKError

Int getCode();

Returns error code.

String getGeneralMessage();

Returns general message for error.

String getDetailMessage();

Returns detail message for error.

CodeTypeGeneral message
1Internal errorAn internal error has occurred. Please try again later.
2Parsing errorThe request could not be parsed correctly.
3Validation errorThe request was not valid according to semantic rules.
4Resource not foundA resource necessary to complete this request does not exist.
5Duplicate resourceThe new resource could not be created as a resource with the same identifying information already exists.
6Business rule violationThe request violated some business rule.
7Subscription limits errorThe request could not be carried out because of a subscription limit.
8Authentication errorAuthentication failed while it is required for the request.
9Authorization errorYou are not authorized for this request.
10Unsupported operationThe request is not supported.
11Device capability not supportedThe specific resource instance does not support the requested or required capability.
12Device authentication errorCan't carry out the request as the device reports the configured user credentials are incorrect.
13Device internal errorCan't carry out the request as device reported an error or responded in an unexpected way. Please try again and/or restart the device.
14Device offline errorCan't carry out request as the device is offline.
15Server offline errorCan't reach server, request timeouted.
16Streamer errorThere was a problem with the streamer.
17Audio input errorThere was a problem with two-way audio.