投屏开关(ProjectionScreen)

使用前置条件

提示

投屏插件需要在“政务大厅窗口”模式下启用辅屏的状态下使用
启用辅屏【点击参考

# 投屏开关 toggleProjection

● 版本限制

2.1.1 +

● 接口说明
开启或关闭投屏,“点一下开,再点一下就关”

● Typescript 类型参考

type ResBody = {
    resultCode: number, resultMessage: string, data: {} 
}

zwexplorer.ProjectionScreen.toggleProjection(
    data?: {}, 
    callback?: (res: ResBody)=>void
): Promise<ResBody>
● 返回数据
参数 类型 必然存在 说明
res.resultCode Number 状态码,0 为正常,其它为异常 [状态码参考]
res.data Object 状态码为 0 时,返回获得的信息
res.data.status Boolen true为正在投屏,false为结束投屏
res.resultMessage String 接口消息
● 接口示例
zwexplorer.ProjectionScreen.toggleProjection({},(res)=>{
  // 返回数据
})