Commit 3d4146de by qlintonger xeno

录制+1

parent 29b7f77d
...@@ -569,12 +569,8 @@ export class AgoraHandle { ...@@ -569,12 +569,8 @@ export class AgoraHandle {
const uid_screen = userStates.value.currentUserId const uid_screen = userStates.value.currentUserId
const record_mode = '1' const record_mode = '1'
const reqData = { const reqData = {
appid: this.agoraOptions.appId, channelId:channel_id,
channel_id, userId:uid_screen,
uid_screen,
callback_url: this.recordConfig.callBackUrl,
record_mode,
file_domain: this.recordConfig.fileDomain
}; };
this.currentRecordingData = { this.currentRecordingData = {
channel_id, uid_screen, record_mode channel_id, uid_screen, record_mode
...@@ -590,8 +586,7 @@ export class AgoraHandle { ...@@ -590,8 +586,7 @@ export class AgoraHandle {
) )
const res = await resp.json() const res = await resp.json()
console.log('开始录制返回结果', res) console.log('开始录制返回结果', res)
if (res.success) { if (res.code.toString() === '200') {
chatChannelState.value.recordSid = res.data.sid;
this.AnyRemote.sendWSFromCall('-2', 'Recording') this.AnyRemote.sendWSFromCall('-2', 'Recording')
return true return true
} }
...@@ -602,7 +597,7 @@ export class AgoraHandle { ...@@ -602,7 +597,7 @@ export class AgoraHandle {
const {channel_id, uid_screen, record_mode} = this.currentRecordingData const {channel_id, uid_screen, record_mode} = this.currentRecordingData
const reqData = { const reqData = {
appid: this.agoraOptions.appId, appid: this.agoraOptions.appId,
channel_id, channelId:channel_id,
uid_screen, uid_screen,
callback_url: this.recordConfig.callBackUrl, callback_url: this.recordConfig.callBackUrl,
record_mode, record_mode,
...@@ -621,7 +616,7 @@ export class AgoraHandle { ...@@ -621,7 +616,7 @@ export class AgoraHandle {
const resp = await hautResp.json() const resp = await hautResp.json()
console.log('结束录制返回结果', resp) console.log('结束录制返回结果', resp)
this.AnyRemote.sendWSFromCall('-2', 'NotRecording') this.AnyRemote.sendWSFromCall('-2', 'NotRecording')
if (resp.success) { if (resp.code.toString() === '200') {
return resp.data return resp.data
} }
return false return false
......
...@@ -58,8 +58,8 @@ app.use(AnyRemotePlugin, { ...@@ -58,8 +58,8 @@ app.use(AnyRemotePlugin, {
recordConfig: { recordConfig: {
callBackUrl: 'https://hna-platform.anyremote.cn/call/saveScreenRecordNoToken', callBackUrl: 'https://hna-platform.anyremote.cn/call/saveScreenRecordNoToken',
fileDomain: 'https://video.anyremote.cn:444', fileDomain: 'https://video.anyremote.cn:444',
recordStartUrl: 'https://ifar.test.com:3001/recorder/v1/start', recordStartUrl: 'http://ifar.test.com:3001/recordings/start',
recordStopUrl: 'https://ifar.test.com:3001/recorder/v1/stop' recordStopUrl: 'http://ifar.test.com:3001/recordings/stop'
}, },
notice: { notice: {
info: Message.info, info: Message.info,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment