Open daveisfera opened 1 week ago
Hi @daveisfera it looks like a codec and container switch is happening without specifying all the codecs within the CODECS
attribute of the EXT-X-STREAM-INF
tag, without this the player doesn't know it needs to call changeType
on the source buffer. See the HLS spec:
any EXT-X-STREAM-INF tag ([Section 4.3.4.2](https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2)) or EXT-X-I-FRAME-STREAM-
INF tag ([Section 4.3.4.3](https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.3)) that references such a Group MUST have a
CODECS attribute that lists every sample format present in any
Rendition in the Group, or client playback failures can occur.
I think a next step would be to put both codecs in that attribute and see if that allows for a successful change.
Moved this to VHS as there seems to be some room for improvement on codec detection, as this media works in Safari and hls.js
Description
Safari and HLS.js will playback video when the codec switches, but Video.js shows an error.
Reduced test case
https://raw.githubusercontent.com/daveisfera/hls_switch/1e04cd07f7fc3077912418584ae3e7b495b224d6/primary_codec_up.m3u8
Steps to reproduce
Another example with switching from H.265 to H.264: https://raw.githubusercontent.com/daveisfera/hls_switch/1e04cd07f7fc3077912418584ae3e7b495b224d6/primary_codec_down.m3u8
NOTE: Safari won't play directly from GitHub because it loads the actual file contents, but if you serve the files in that repo from a web server, then it will show that Safari handles this without issue
Errors
What version of Video.js are you using?
8.17.4
Video.js plugins used.
N/A
What browser(s) including version(s) does this occur with?
Chrome 129.0.6668.72 and Safari 18.0
What OS(es) and version(s) does this occur with?
macOS 15.0