fix: 会议回音

This commit is contained in:
kuaifan 2023-04-02 22:43:18 +08:00
parent d11a89d02c
commit 91f3ea7c46
2 changed files with 10 additions and 17 deletions

View File

@ -225,14 +225,13 @@ export default {
delete data.name;
delete data.msgs;
//
$A.loadScript('js/AgoraRTC_N-4.17.0.js', e => {
if (e !== null || typeof AgoraRTC !== 'object') {
$A.modalError("会议组件加载失败!");
} else {
$A.loadScript('js/AgoraRTC_N-4.17.0.js').then(_ => {
this.join(data)
}
}).catch(_ => {
$A.modalError("会议组件加载失败!");
}).finally(_ => {
this.loadIng--;
});
})
}).catch(({msg}) => {
this.loadIng--;
$A.modalError(msg);
@ -323,7 +322,7 @@ export default {
}
//
AgoraRTC.onAutoplayFailed = () => {
//
$A.messageWarning("点击屏幕开始会议");
}
//

View File

@ -75,19 +75,13 @@ export default {
watch: {
audio: {
handler(b) {
if (this.isLocal || !b) {
return
}
this.play('audio')
b && this.play('audio')
},
immediate: true
},
video: {
handler(b) {
if (!b) {
return
}
this.play('video')
b && this.play('video')
},
immediate: true
}
@ -97,7 +91,7 @@ export default {
this.$nextTick(_ => {
try {
if (type === 'audio') {
this.player.audioTrack.play();
!this.isLocal && this.player.audioTrack.play();
} else if (type === 'video') {
this.player.videoTrack.play(this.id);
}