Browse Source

修正不同终端开关音频设置不同引起播放问题的bug

pull/1/head
Lawrence 4 years ago
parent
commit
2589c5fac8
  1. 4
      web_src/src/components/gb28181/devicePlayer.vue

4
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();

Loading…
Cancel
Save