Commit b51f8147 by qlintonger xeno

录制完毕初步+1

parent a7057841
......@@ -207,6 +207,14 @@ export class Agora {
webrtcStates.value.isCameraAttached = wholeCameraSet.length > 0
webrtcStates.value.isMicroAttached = info.filter(a => a.kind === 'audioinput').length > 0;
console.log('当前设备状况', info, chatChannelState.value)
this.app.sendWSFromCall(
'0',
'SetAtts',
{
hasCamera: Boolean(webrtcStates.value.isCameraAttached) ? '1' : '0',
hasMike: Boolean(webrtcStates.value.isMicroAttached) ? '1' : '0'
}
)
})
AgoraRTC.onCameraChanged = function () {
window.navigator.mediaDevices.enumerateDevices()
......
......@@ -569,8 +569,8 @@ export class AgoraHandle {
const uid_screen = userStates.value.currentUserId
const record_mode = '1'
const reqData = {
channelId:channel_id,
userId:uid_screen,
channel_id,
uid_screen,
};
this.currentRecordingData = {
channel_id, uid_screen, record_mode
......@@ -597,7 +597,7 @@ export class AgoraHandle {
const {channel_id, uid_screen, record_mode} = this.currentRecordingData
const reqData = {
appid: this.agoraOptions.appId,
channelId:channel_id,
channel_id,
uid_screen,
callback_url: this.recordConfig.callBackUrl,
record_mode,
......@@ -617,7 +617,7 @@ export class AgoraHandle {
console.log('结束录制返回结果', resp)
this.AnyRemote.sendWSFromCall('-2', 'NotRecording')
if (resp.code.toString() === '200') {
return resp.data
return resp.save_data
}
return false
}
......
......@@ -83,6 +83,13 @@ export const alova = createAlova({
userStore.handleLogOut()
return Promise.reject(new Error(json.message))
} else {
console.log('upload here', method, json);
if(method.url === '/admin/uploadMuFile') {
json.data.url = json.data.url.replace(
json.data.url.substring(0, json.data.url.indexOf('/upload')),
method.baseURL
)
}
return json
}
},
......
......@@ -58,8 +58,8 @@ app.use(AnyRemotePlugin, {
recordConfig: {
callBackUrl: 'https://hna-platform.anyremote.cn/call/saveScreenRecordNoToken',
fileDomain: 'https://video.anyremote.cn:444',
recordStartUrl: 'https://ifar.test.com:440/record/start',
recordStopUrl: 'https://ifar.test.com:440/record/stop'
recordStartUrl: 'https://ifar.test.com:440/recorder/v1/start',
recordStopUrl: 'https://ifar.test.com:440/recorder/v1/stop'
},
notice: {
info: Message.info,
......
......@@ -115,7 +115,7 @@ async function toggleRecording() {
console.log('录制结果提示?', resp)
if (resp) {
AnyR?.agora.sendVideo({
fileUrl: resp.url,
fileUrl: resp.video_url,
fileName: resp.fileName,
fileSize: resp.fileSize
})
......@@ -174,7 +174,7 @@ function paintSaved(blob: any) {
AnyR?.agora.archiveMark({
fileUrl: res.data.url,
fileName: res.data.name,
fileSize: Number.parseInt(res.data.size),
fileSize: Number.parseInt(res.data.raw_size),
fileType: 'image'
})
}
......
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