更新时间:2024-03-01 GMT+08:00
分享

截图返回base64编码

接口描述

视频通话过程中截取一张对方的视频画面并返回图片base64编码。

注意事项

前置条件:已经建立与OpenEyeCall的WebSocket连接并处于视频通话中。

方法定义

OpenEyeCall.prototype.screenShotBase64 = function(callbacks)

参数描述

表1 参数说明

参数名

类型

可选/必选

描述

callbacks

Callback

必选

回调方法。

表2 Callback

参数名

类型

可选/必选

描述

response

function

必选

回调方法。

表3 回调方法的入参

参数名

类型

描述

description

String

当前请求描述。

base64

String

若成功,则是图片base64编码,若失败,则无此字段

result

Number

设置结果。1表示失败,若成功则无此字段。

rsp

Number

内部消息编号。

回调方法的入参示例:

{
   "description" : "OEScreenShot",
   "result" : 1,
   "rsp" : 67762
}

{
   "description" : "OEScreenShot",
   "base64" : "xxx",
   "rsp" : 67762
}

使用示例

function startScreenShotBase64(){
	console.info("startScreenShot");
	this.global_openEye_SDK.openEyeCall.screenShotBase64({ response: startScreenShotResponse })
}

function startScreenShotResponse(data){
	console.log(data);
	if (data.result == 0) {
        console.info("startScreenShot Success");
    } else {
        console.error("startScreenShot failed");
        console.error(data);
    }
}
分享:

    相关文档

    相关产品