From 2589c5fac8827f281df618e10335ab8dec17c402 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: Mon, 9 Nov 2020 18:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=8D=E5=90=8C=E7=BB=88?= =?UTF-8?q?=E7=AB=AF=E5=BC=80=E5=85=B3=E9=9F=B3=E9=A2=91=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E5=BC=95=E8=B5=B7=E6=92=AD=E6=94=BE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/gb28181/devicePlayer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue index b8e45ba4..780d03e5 100644 --- a/web_src/src/components/gb28181/devicePlayer.vue +++ b/web_src/src/components/gb28181/devicePlayer.vue @@ -223,15 +223,15 @@ export default { play: function (streamInfo, hasAudio) { this.hasaudio = hasAudio; // 根据媒体流信息二次判断 + var realHasAudio = false; if (!!streamInfo.tracks && streamInfo.tracks.length > 0 && hasAudio) { - var realHasAudio = false; for (let i = 0; i < streamInfo.tracks.length; i++) { if (streamInfo.tracks[i].codec_type == 1 && streamInfo.tracks[i].codec_id_name == "CodecAAC") { // 判断为AAC音频 realHasAudio = true; } } - this.hasaudio = realHasAudio && this.hasaudio; } + this.hasaudio = realHasAudio && this.hasaudio; this.ssrc = streamInfo.ssrc; // this.$refs.videoPlayer.hasaudio = hasAudio; // this.videoUrl = streamInfo.flv + "?" + new Date().getTime();