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.
Code | Type | General message |
---|---|---|
1 | Internal error | An internal error has occurred. Please try again later. |
2 | Parsing error | The request could not be parsed correctly. |
3 | Validation error | The request was not valid according to semantic rules. |
4 | Resource not found | A resource necessary to complete this request does not exist. |
5 | Duplicate resource | The new resource could not be created as a resource with the same identifying information already exists. |
6 | Business rule violation | The request violated some business rule. |
7 | Subscription limits error | The request could not be carried out because of a subscription limit. |
8 | Authentication error | Authentication failed while it is required for the request. |
9 | Authorization error | You are not authorized for this request. |
10 | Unsupported operation | The request is not supported. |
11 | Device capability not supported | The specific resource instance does not support the requested or required capability. |
12 | Device authentication error | Can't carry out the request as the device reports the configured user credentials are incorrect. |
13 | Device internal error | Can't carry out the request as device reported an error or responded in an unexpected way. Please try again and/or restart the device. |
14 | Device offline error | Can't carry out request as the device is offline. |
15 | Server offline error | Can't reach server, request timeouted. |
16 | Streamer error | There was a problem with the streamer. |
17 | Audio input error | There was a problem with two-way audio. |
Updated almost 2 years ago