修复无音频通道开启通道音频后无法播放的bug
修复点播接口真的收到视频后回复
This commit is contained in:
@@ -124,6 +124,18 @@
|
||||
play: function(streamInfo, deviceId, channelId, hasAudio) {
|
||||
console.log(hasAudio);
|
||||
this.hasaudio = hasAudio;
|
||||
// 根据媒体流信息二次判断
|
||||
if( this.hasaudio && !!streamInfo.tracks && streamInfo.tracks.length > 0) {
|
||||
var realHasAudio = false;
|
||||
for (let i = 0; i < streamInfo.tracks; i++) {
|
||||
if (streamInfo.tracks[i].codec_type == 1) { // 判断为音频
|
||||
realHasAudio = true;
|
||||
}
|
||||
}
|
||||
this.hasaudio = realHasAudio && this.hasaudio;
|
||||
}
|
||||
console.log("111")
|
||||
console.log(this.hasaudio)
|
||||
this.ssrc = streamInfo.ssrc;
|
||||
this.deviceId = deviceId;
|
||||
this.channelId = channelId;
|
||||
|
||||
Reference in New Issue
Block a user