From f635f9c3003ae10f7be8e934b81bc480c82617ba Mon Sep 17 00:00:00 2001 From: xiaoxie <hotcoffie@163.com> Date: 星期三, 20 四月 2022 13:56:30 +0800 Subject: [PATCH] 修复录像列表:实测部分厂家(TP-Link IPC43AW)录像列表接口,返回的xml报文数据中有多余的空格,导致解析String为Integer失败,增加trim修复这个问题 --- 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