修改bug

This commit is contained in:
张运江 2025-02-26 15:19:07 +08:00
parent 8018b9745c
commit 91f89edd16
2 changed files with 30 additions and 5 deletions

View File

@ -734,7 +734,7 @@ export default {
let res = await window.tccc.Call.startOutboundCall({phoneNumber: this.phoneNumber, uuid: this.caseId})
this.sessionId = res.data.sessionId
console.log('呼叫成功', res.data)
this.calling = true
if (res.status === 'success') {
this.callingSuccess()
@ -756,11 +756,13 @@ export default {
// this.getmediate_record()
this.$refs.layoutContent.getmediate_record();
this.$refs.layoutContent.openRecordDialog(res);
this.queueList[this.index].status.code = 2 //
} catch (err) { }
},
//
async callingFail () {
try {
this.queueList[this.index].status.code = 2 //
// let res = await api.callingFail({caseId: this.caseId,contactId: this.contactId,callingSessionId:this.sessionId})
} catch (err) { }
},
@ -782,6 +784,7 @@ export default {
//
nextCall() {
console.log('自动拨打下一个会话')
console.log('this.queue',this.queue, 'this.isPause', this.isPause)
if (!this.queue) return
if (this.isPause) {
this.isPause = false

View File

@ -214,8 +214,6 @@ export default {
//
handleEnterRoom() {
this.enterRoom();
this.handleStartLocalAudio();
this.handleStartLocalVideo();
},
async enterRoom() {
console.log({
@ -234,6 +232,9 @@ export default {
});
this.installEventHandlers();
this.startGetAudioLevel();
this.handleStartLocalAudio();
this.handleStartLocalVideo();
}catch (e) {
console.log('视频云初始化报错!', e)
throw e;
@ -241,7 +242,7 @@ export default {
},
//
//
async handleStartLocalAudio() {
if (this.micStatus) {
return;
@ -312,10 +313,31 @@ export default {
}
await this.trtc.stopLocalAudio();//
await this.trtc.stopLocalVideo();//
this.trtc = null;
// window.location.reload();
// await this.trtc.stopScreenShare();//
},
//
stopCamera() {
if (navigator.mediaDevices.getUserMedia) {
console.log('获取摄像头',navigator.mediaDevices.getUserMedia)
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
console.log('获取摄像头-stream',stream)
if (stream) {
const tracks = stream.getTracks();
console.log('获取摄像头-tracks',tracks)
tracks.forEach(track => track.stop());
}
})
.catch(error => {
console.error("Error accessing the camera.", error);
});
} else {
console.error("getUserMedia not supported on your browser.");
}
},
//
startGetAudioLevel() {
this.trtc.on(TRTC.EVENT.AUDIO_VOLUME, (event) => {