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

View File

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