getRemoteDeviceInfo 方法
作用:
获取远程当前已连接设备的信息
原型:
interface CoolinkRetRemoteDevice {
code: number,
msg?: string,
connectId: string,
deviceId: string,
deviceName?: string,
deviceType?: string,
videoSource?: string,
deviceChip?: string,
deviceModel?: string,
}
function getRemoteDeviceInfo(): Promise<CoolinkRetRemoteDevice>;
参数:无
返回值:
| 属性 | 类型 | 说明 | 解释 |
|---|---|---|---|
| code | number | 错误码 | 表示是否发生错误的一个数字,没有错误则为 0 |
| msg | string | 错误信息文本 | 表示是否发生错误的一个字符串描述,可选 |
| connectId | string | connectId | 当前远程已连接设备的connectId |
| deviceId | string | 设备ID 或激活ID | 设备ID 或激活ID |
| deviceName | string | 设备名称 | 设备名称 |
| deviceType | string | 设备类型 | 选项有mobile和tv |
| videoSource | string | 视频源类型 | 对方设备的视频的源类型,腾讯还是爱奇艺等 |
| deviceChip | string | 机芯 | 已连接的对方设备的机芯 |
| deviceModel | string | 机型 | 已连接的对方设备的机型 |
范例:
import { coolink, Util } from 'coolink';
let info = await coolink.protocol.getRemoteDeviceInfo();
Util.log('已连接的设备名:' + info.deviceName);
//
©深圳市酷开网络科技股份有限公司 ICP备案号粤ICP备06098778号
