videojs / videojs-contrib-quality-levels

Other
157 stars 51 forks source link

m3u8 can not get .m4a , audio only streaming level #18

Closed WeBBLiu closed 7 years ago

WeBBLiu commented 7 years ago

Hi,

can not get last file info , it's audio only , m4a streaming. Thank you.

EXTM3U

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1200000,RESOLUTION=854x480

/video/sample_1200k.mp4.m3u8

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=150000,RESOLUTION=320x180

/video/sample_150k.mp4.m3u8

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2000000,RESOLUTION=1280x720

/video/sample_2000k.mp4.m3u8

EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=128000,CODECS="mp4a.40.2"

/audio/sample.m4a.m3u8

mjneil commented 7 years ago

This is because of the way videojs-contrib-hls blacklists variants that are incompatible to the initial selected variant.

Blacklist playlists that are known to be codec or stream-incompatible with the SourceBuffer configuration. For instance, Media Source Extensions would cause the video element to stall waiting for video data if you switched from a variant with video and audio to an audio-only one.

Since any variants blacklisted in this function are blacklisted permanently, we don't include it in the list of QualityLevels since the player won't allow switching to that variant anyway