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

Obtaining the List of Shareable Applications

Interface Description

This interface is invoked to obtain the list of application windows that can be shared in the current operating system.

Notes

Prerequisites: The WebSocket connection with the OpenEye has been set up, and a video call is in progress.

Method Definition

OpenEyeCall.prototype.getAppList = 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

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.

param

key:value

Key-value pair of the window handle and window name.

The following is an example of input parameters of the callback method:
{
   "description" : "tsdk_share_evt_getapplist",
   "result" : 0,
   "rsp" : 67753
   "param":{
     65552: "Desktop"
     132070: "app1"
     132974: "app2"
     198240: "app3"
     328180: "app4"
     329712: "app5"
   }
}

Note: Numbers like 65552 are corresponding window handles in the window system. The first parameter in the input parameters of Setting the Information About the Applications to Be Shared is the value.

Examples

function getAppList(){
    this.global_openEye_SDK.openEyeCall.getAppList({ response: getAppListResponse })
}
function getAppListResponse(data) {
    console.log(data);
    if (data.result == 0) {
        console.info("getAppListResponse success");
        document.getElementById("shareAppList").innerHTML = "";
        for (var key in data.param) {
            var item = data.param[key];
            document.getElementById("shareAppList").options.add(new Option(key + "_" + item, key));
        }
    } else {
        console.error("getAppListResponse failed");
    }
}