From 2589c5fac8827f281df618e10335ab8dec17c402 Mon Sep 17 00:00:00 2001
From: Lawrence <1934378145@qq.com>
Date: 星期一, 09 十一月 2020 18:44:35 +0800
Subject: [PATCH] 修正不同终端开关音频设置不同引起播放问题的bug
---
web_src/src/components/gb28181/devicePlayer.vue | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue
index b8e45ba..780d03e 100644
--- a/web_src/src/components/gb28181/devicePlayer.vue
+++ b/web_src/src/components/gb28181/devicePlayer.vue
@@ -223,15 +223,15 @@
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") { // 鍒ゆ柇涓篈AC闊抽
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();
--
Gitblit v1.8.0