Updated on 2023-10-12 GMT+08:00

Starting and Stopping Screen Recording

Interface Description

This interface is invoked to start or stop recording the screen of the other party and return the video path during a video call.

Notes

Prerequisites: The WebSocket connection with the OpenEyeCall has been set up, and a video call is in progress.

Method Definition

OpenEyeCall.prototype.videoCatch = function(operation, callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

operation

int

Mandatory

Operation type. The value 0 indicates starting screen recording and 1 indicates stopping screen recording.

callbacks

Callback

Mandatory

Callback method.

Table 2 Callback

Parameter

Type

Mandatory/Optional

Description

response

function

Mandatory

Callback method.

Table 3 Input parameters of the callback method

Parameter

Type

Description

description

String

Description of the current request.

path

String

If the operation is successful, this parameter indicates the video path and is returned when the screen recording ends successfully.

result

Number

Configuration result. The value 0 indicates success and 1 indicates failure. If this parameter does not exist, the operation is successful.

rsp

Number

Internal message ID.

The following is an example of input parameters of the callback method:

{
   "description" : "OECatchVideo",
   "result" : 1,
   "rsp" : 67762
}

{
   "description" : "OECatchVideo",
   "path" : "xxx",
   "rsp" : 67762
}

Examples

function catchVideo(operation){
	this.global_openEye_SDK.openEyeCall.videoCatch(operation, { response: startVideoCatchResponse })
}

function startVideoCatchResponse(data){
	console.log(data);
	if (data.result == 0) {
        console.info("VideoCatch Success");
    } else {
        console.error("VideoCatch failed");
        console.error(data);
    }
}