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

setVideoDisplayMode (Setting the Image Cropping Mode in the Video Window)

Interface Description

This interface is invoked to set the video image cropping parameters during a video call.

Notes

The WebSocket connection with the OpenEye is set up.

Method Definition

OpenEyeCall.prototype.setVideoDisplayMode = function(displayMode,callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

displayMode

Number

Mandatory

Cropping mode of the video image. The value 1 indicates the cropping mode (not stretched) and the value 2 indicates the stretching mode (not stretched).

callbacks

Callback

Optional

Callback method.

Table 2 Callback

Parameter

Type

Mandatory/Optional

Description

response

function

Mandatory

For details about the input parameters of the callback method, see Table 3.

Table 3 Input parameters of the callback method

Parameter

Type

Description

description

String

Description of the current request.

result

Number

Configuration result. The value 0 indicates success and other values indicate failure.

rsp

Number

Internal message ID.

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

{
   "description" : "tsdk_set_video_display_mode",
   "result" : 0,
   "rsp" : 67751
}

Examples

function setVideoWindowParam() {
this.global_openEye_SDK.openEyeCall.setVideoDisplayMode(param, { response: setVideoDisplayModeResponse })
}
function setVideoDisplayModeResponse(data) {
    if (data.result == 0) {
        console.info("setVideoDisplayMode Success");
    } else {
        console.error("setVideoDisplayMode failed");
    }
}