Commit b51f8147 by qlintonger xeno

录制完毕初步+1

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