From 3e71e0bdf1e4b2e527d491d426f67e34b7d3c148 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sat, 5 Nov 2022 11:35:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?perf(rtcPlayer):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=20log=20=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/rtcPlayer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/dialog/rtcPlayer.vue b/web_src/src/components/dialog/rtcPlayer.vue index 4737849b..f957df71 100644 --- a/web_src/src/components/dialog/rtcPlayer.vue +++ b/web_src/src/components/dialog/rtcPlayer.vue @@ -51,7 +51,7 @@ export default { }); webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,(e)=>{//获取到了远端流,可以播放 - console.error('播放成功',e.streams) + console.log('播放成功',e.streams) this.eventcallbacK("playing", "播放成功") }); @@ -59,7 +59,7 @@ export default { console.error('offer anwser 交换失败',e) this.eventcallbacK("OFFER ANSWER ERROR ", "offer anwser 交换失败") if (e.code ==-400 && e.msg=="流不存在"){ - console.log("111111") + console.log("流不存在") this.timer = setTimeout(()=>{ this.webrtcPlayer.close(); this.play(url) From 189b6044b4f49b43c83ebadeebf0e41457bfb518 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sat, 5 Nov 2022 11:46:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(devicePlayer):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E9=A1=B5?= =?UTF-8?q?=20HTTPS=20=E7=8E=AF=E5=A2=83=E4=B8=8B=20WebRTC=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/devicePlayer.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index 4d8f7199..0df4b022 100644 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -121,6 +121,10 @@ RTC: {{ streamInfo.rtc }} + + RTCS: + {{ streamInfo.rtcs }} + RTMP: {{ streamInfo.rtmp }} @@ -322,7 +326,7 @@ export default { player: { jessibuca : ["ws_flv", "wss_flv"], livePlayer : ["ws_flv", "wss_flv"], - webRTC: ["rtc", "rtc"], + webRTC: ["rtc", "rtcs"], }, videoHistory: { date: '', @@ -393,7 +397,7 @@ export default { changePlayer: function (tab) { console.log(this.player[tab.name][0]) this.activePlayer = tab.name; - this.videoUrl = this.streamInfo[this.player[tab.name][0]] + this.videoUrl = this.getUrlByStreamInfo() console.log(this.videoUrl) }, openDialog: function (tab, deviceId, channelId, param) { From aae7c80fd5c6d89fb392e86648920db6c79eca51 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sat, 5 Nov 2022 12:50:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(live):=20=E4=BF=AE=E5=A4=8D=E5=88=86?= =?UTF-8?q?=E5=B1=8F=E7=9B=91=E6=8E=A7=20HTTPS=20=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/live.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/live.vue b/web_src/src/components/live.vue index c2c09f4c..4a7af491 100644 --- a/web_src/src/components/live.vue +++ b/web_src/src/components/live.vue @@ -138,8 +138,14 @@ export default { url: '/api/play/start/' + deviceId + '/' + channelId }).then(function (res) { if (res.data.code === 0 && res.data.data) { - itemData.playUrl = res.data.data.httpsFlv - that.setPlayUrl(res.data.data.ws_flv, idxTmp) + let videoUrl; + if (location.protocol === "https:") { + videoUrl = res.data.data.wss_flv; + } else { + videoUrl = res.data.data.ws_flv; + } + itemData.playUrl = videoUrl; + that.setPlayUrl(videoUrl, idxTmp); } else { that.$message.error(res.data.msg); }