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

setVideoWindowParam (Setting the Position, Width, and Height of the Video Window)

Interface Description

This interface is invoked to set video image parameters during a video call, including the position, width, and height (in pixels).

Notes

The WebSocket connection with the OpenEye is set up.

Note that the recommended width and height of the video image are 720 pixels and 480 pixels, respectively. The minimum width and height that can be displayed on the UI are 480 pixels and 360 pixels, respectively. If the values are less than 480 pixels and 360 pixels, only the video image is displayed, and the operation control UI is not displayed. You are not advised to set the width and height to values less than 480 pixels and 360 pixels.

Before answering a video call, invoke this interface to preset the video window information. After this interface is invoked to set the video window information, the video window information is valid for a long time. The video window information is changed only when you invoke this interface again to modify the video window information or close the entire page.

Method Definition

OpenEyeCall.prototype.setVideoWindowParam= function(posX,posY,width,height,callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

posX

Number

Mandatory

X coordinate at the upper left corner of the video window. The value must be greater than 0.

posY

Number

Mandatory

Y coordinate at the upper left corner of the video window. The value must be greater than 0.

width

Number

Mandatory

Video window width.

height

Number

Mandatory

Video window height.

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_rect",
   "result" : 0,
   "rsp" : 67745
}

Examples

function setVideoWindowParam() {
this.global_openEye_SDK.openEyeCall.setVideoWindowParam(20,30,720,480, { response: setVideoWindowParamResponse })
}

function setVideoWindowParamResponse(data) {
    if (data.result == 0) {
        console.info("setVideoWindowParam Success");
    } else {
        console.error("setVideoWindowParam failed");
    }
}