截图返回base64编码
接口描述
视频通话过程中截取一张对方的视频画面并返回图片base64编码。
注意事项
前置条件:已经建立与OpenEyeCall的WebSocket连接并处于视频通话中。
方法定义
OpenEyeCall.prototype.screenShotBase64 = function(callbacks)
参数描述
|
参数名 |
类型 |
可选/必选 |
描述 |
|---|---|---|---|
|
callbacks |
必选 |
回调方法。 |
|
参数名 |
类型 |
描述 |
|---|---|---|
|
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);
}
}