protocol in ObjC/Swift is interface in Java; delegate in ObjC/Swift is listener in Java.
All class names in ObjC/Swift starts with prefix "CM" (i.e CMAccessTokenProvider etc).
Constructs CameraSniffer instance.
Starts broadcasting for cloud cameras discovery.
Returns true if broadcasting is active.
Returns list of founded devices.
@required onFound(Device device);
Will get called when new camera has been detected in the network.
@required onLost(Device device);
Will get called when discovered camera don't response for broadcast message.
@required onError(MobileSDKError error);
Will get called if there's an error in the process of sniffing a camera.
Returns IP4 address of device.
Returns MAC address of device.
Returns brand of device.
Returns model of device.
Returns addresses of device.
Returns model info of device.
Returns type ID of device.
Constructs CameraWizard instance.
addDevice(Device device, String cameraName, Long zoneId);
Adds a device to a specific zone specified by zoneId. For mode details about Device class check CameraSniffer (v3.0) page.
@required onAdded(Camera camera);
If everything went ok, will get called after the camera has been added.
@required onError(MobileSDKError error, Device device);
Will get called if there's an error in the process of adding a camera.
Returns name of camera in system.
Returns zone ID of camera in system.
Returns ID of camera in system.
Returns device info of camera. For mode details about Device class check CameraStreamer page.
Returns properties of camera.
- **In Android CameraStreamer is rendering video frames directly into Surface while in iOS CameraStreamer returns UIImage object which represents video frame.**
- **In case of multiple CameraStreamer instances usage it's generally advised to mute audio on all or all except one CameraStreamer instances.**
- Android specific: CameraStreamer constructor takes Surface parameter (most commonly obtained via TextureView::getSurfaceTexture() method).
- **Android specific:** takeSnapshot() method is absent because the video decoder works directly with passed Surface object and therefore doesn't have access to raw frames. There is an easy and convenient way to take snapshot though: TextureView::getBitmap() method (the same view that holds the Surface from the previous step).
CameraStreamer(String rtspUrlString, CameraStreamerDelegate delegate);
Constructs CameraStreamer instance.
Resumes streaming: footage from pause point, live from current timestamp.
Pauses streaming (both live and footage).
Jumps to concrete time in [0 ... duration] range and starts playing (even if footage was paused). In milliseconds. Wouldn't affect live streaming.
Returns true if the playback has been started.
Returns true if streaming is not footage.
returns start time of footage stream (0 for live stream), in milliseconds till 1970.
returns end time of footage stream (0 for live stream), in milliseconds till 1970.
returns duration of footage stream (0 for live stream), in milliseconds.
returns current position in [0 ... duration] range for footage stream or current timestamp for live stream, in milliseconds.
mutes audio by ignoring the audio stream altogether.
iOS specific: returns last decoded frame.
Will get called when the playback has been effectively resumed/started.
Will get called when the playback has been paused.
@optional onSoughtToTime(float time);
Will get called when the playback has been sought to given time.
Will get called when the playback has been ended. Will be called only for footage stream as live stream can't end.
@required onFrameDataReceived(UIImage frame, Double timestamp);
iOS specific: When a new frame arrives, this method will be called.
@required onError(MobileSDKError error);
Will be called if there is an error in the streaming process.
static setDelegate(AccessTokenProviderDelegate delegate);
SDK will ask AccessTokenProviderDelegate to provide access token when required. You MUST set delegate before using SDK otherwise you'll get 401 (unauthorised) error.
Will be called each time when access token is required.
Returns error code.
Returns general message for error.
Returns detail message for error.
|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.|
Updated 9 months ago