fix: assign hasVideo based on video track

This commit is contained in:
SimonAllen 2025-03-11 10:50:05 +08:00 committed by GitHub
parent c945b03dae
commit 0ebb47956e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,7 +146,7 @@ class HlsJsPlugin extends BasePlugin {
hls.on(Hls.Events.FRAG_PARSING_INIT_SEGMENT, (flag, payload) => {
mediainfo.hasAudio = !!((payload.tracks && payload.tracks.audio))
mediainfo.hasVideo = !!((payload.tracks && payload.tracks.audio))
mediainfo.hasVideo = !!((payload.tracks && payload.tracks.video))
if (mediainfo.hasAudio) {
const track = payload.tracks.audio