From 62e82ea9ee6a73cf7cdcfe1ab1a7b49a23f571e3 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 15 十月 2021 17:58:28 +0800 Subject: [PATCH] 录像下载修复 --- web_src/src/components/dialog/rtcPlayer.vue | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/web_src/src/components/dialog/rtcPlayer.vue b/web_src/src/components/dialog/rtcPlayer.vue index a7c0212..75c18f3 100644 --- a/web_src/src/components/dialog/rtcPlayer.vue +++ b/web_src/src/components/dialog/rtcPlayer.vue @@ -17,9 +17,13 @@ }, props: ['videoUrl', 'error', 'hasaudio'], mounted () { + let paramUrl = decodeURIComponent(this.$route.params.url) this.$nextTick(() =>{ - console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl) - this.play(this.videoUrl) + if (typeof (this.videoUrl) == "undefined") { + this.videoUrl = paramUrl; + } + console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl) + this.play(this.videoUrl) }) }, watch:{ @@ -60,7 +64,7 @@ this.webrtcPlayer.close(); this.play(url) }, 100) - + } }); @@ -69,14 +73,14 @@ // document.getElementById('selfVideo').srcObject=s; this.eventcallbacK("LOCAL STREAM", "鑾峰彇鍒颁簡鏈湴娴�") }); - + }, pause: function () { if (this.webrtcPlayer != null) { this.webrtcPlayer.close(); this.webrtcPlayer = null; } - + }, eventcallbacK: function(type, message) { console.log("player 浜嬩欢鍥炶皟") @@ -106,5 +110,5 @@ /* .iconqingxiLOGO { display: none !important; } */ - -</style> \ No newline at end of file + +</style> -- Gitblit v1.8.0