From d7456d9e71b67aeda54ee5fad192a78429da31c7 Mon Sep 17 00:00:00 2001 From: "xie.bx" Date: Fri, 25 Nov 2022 12:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=81=8A=E5=A4=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD-=E5=BC=80=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chat/ChatPrivateVideo.vue | 28 ++++++++++++++++--- im-ui/src/view/Home.vue | 1 + 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/im-ui/src/components/chat/ChatPrivateVideo.vue b/im-ui/src/components/chat/ChatPrivateVideo.vue index 87bcb3d..f2eb838 100644 --- a/im-ui/src/components/chat/ChatPrivateVideo.vue +++ b/im-ui/src/components/chat/ChatPrivateVideo.vue @@ -53,9 +53,26 @@ "urls": navigator.mozGetUserMedia ? "stun:stun.services.mozilla.com" : navigator.webkitGetUserMedia ? "stun:stun.l.google.com:19302" : "stun:23.21.150.121" }, - { - urls: "stun:stun.l.google.com:19302" - } + {urls: "stun:stun.l.google.com:19302"}, + {urls: "stun:stun1.l.google.com:19302"}, + {urls: "stun:stun2.l.google.com:19302"}, + {urls: "stun:stun3.l.google.com:19302"}, + {urls: "stun:stun4.l.google.com:19302"}, + {urls: "stun:23.21.150.121"}, + {urls: "stun:stun01.sipphone.com"}, + {urls: "stun:stun.ekiga.net"}, + {urls: "stun:stun.fwdnet.net"}, + {urls: "stun:stun.ideasip.com"}, + {urls: "stun:stun.iptel.org"}, + {urls: "stun:stun.rixtelecom.se"}, + {urls: "stun:stun.schlund.de"}, + {urls: "stun:stunserver.org"}, + {urls: "stun:stun.softjoys.com"}, + {urls: "stun:stun.voiparound.com"}, + {urls: "stun:stun.voipbuster.com"}, + {urls: "stun:stun.voipstunt.com"}, + {urls: "stun:stun.voxgratia.org"}, + {urls: "stun:stun.xten.com"} ] } } @@ -102,10 +119,11 @@ }, closeCamera(){ if(this.stream){ + this.stream.getVideoTracks().forEach((track) =>{ track.stop(); - this.$refs.mineVideo.srcObject = null; }); + this.$refs.mineVideo.srcObject = null; this.stream = null; } @@ -205,6 +223,7 @@ method: 'post' }) this.close(); + this.$message.success("已挂断视频通话") }, cancel(){ this.$http({ @@ -212,6 +231,7 @@ method: 'post' }) this.close(); + this.$message.success("已停止呼叫视频通话") }, sendFailed(reason) { this.$http({ diff --git a/im-ui/src/view/Home.vue b/im-ui/src/view/Home.vue index 6ff0632..984dd87 100644 --- a/im-ui/src/view/Home.vue +++ b/im-ui/src/view/Home.vue @@ -79,6 +79,7 @@ methods: { init(userInfo) { this.$store.commit("setUserInfo", userInfo); + this.$store.commit("setUserState", this.$enums.USER_STATE.FREE); this.$store.commit("initStore"); this.$wsApi.createWebSocket(process.env.VUE_APP_WS_URL, userInfo.id); this.$wsApi.onopen(() => {