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

Returning a Screenshot Path

Interface Description

This interface is invoked to capture an image of the other party and return the image 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.screenShot = function(callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

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 path for storing the generated image. If the operation fails, this parameter does not exist.

result

Number

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

rsp

Number

Internal message ID.

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

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

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

Examples

function startScreenShot(){
	console.info("startScreenShot");
	this.global_openEye_SDK.openEyeCall.screenShot({ response: startScreenShotResponse })
}

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