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

setVideoLayoutMode (Setting the Video Window Layout Mode)

Interface Description

This interface is invoked to set the video layout mode during a video call. Two video layout modes are available: side-by-side and picture-in-picture.

Notes

The WebSocket connection with the OpenEye is set up.

Method Definition

OpenEyeCall.prototype.setVideoLayoutMode = function(layoutMode,callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

layoutMode

Number

Mandatory

Video mode. The value 0 indicates the picture-in-picture mode and the value 1 indicates the side-by-side mode.

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_layout_mode",
   "result" : 0,
   "rsp" : 67749
}

Examples

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