服务器录制
服务器录制服务将客户端发送的白板数据在服务端录制,方便开发者做回放等相关开发。该功能需要开通以后才能使用。
点对点白板服务器录制信息
- API介绍
点对点互动白板中,主叫和被叫在 sessionConfig
中 设置 record
为 true
后,即可。
- 示例
// 主叫发起呼叫
const pushConfig = {
enable: true,
needBadge: true,
needPushNick: true,
pushContent: '',
custom: '测试自定义数据',
pushPayload: '',
sound: ''
}
const sessionConfig = {
record: true
}
whiteboard.call({
type: type,
netcallType: WhiteBoard.CALL_TYPE_AUDIO,
account: 'testAccount',
pushConfig: pushConfig,
sessionConfig: sessionConfig,
webrtcEnable: true,
}).then(function(obj) {
// 成功发起呼叫
console.log('call success', obj)
}).catch(function(err) {
// 被叫不在线
if (err.code === 11001) {
console.log('callee offline', err)
}
})
// 设置超时计时器
let callTimer = setTimeout(function() {
if (!whiteboard.callAccepted) {
console.log('超时未接听, hangup')
hangup()
}
}, 1000 * 30)
// 被叫响应呼叫
beCalling = false
const sessionConfig = {
record: true
}
whiteboard.response({
accepted: true,
beCalledInfo: beCalledInfo,
sessionConfig: sessionConfig
}).catch(function(err) {
reject()
console.log('接听失败', err)
})
本篇文档内容是否对您有帮助?
有帮助
我要吐槽
此文档对你是否有帮助
×
有帮助
我要吐槽
×