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
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 |
Optional |
Callback method. |
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
response |
function |
Mandatory |
For details about the input parameters of the callback method, see Table 3. |
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"); } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot