BufferAppendError in Safari, Mac
What version of Hls.js are you using?
1.5.20
What browser (including version) are you using?
Safari 18.1.1
What OS (including version) are you using?
Mac
Test stream
See repro URL
Configuration
{}
Additional player setup steps
No response
Checklist
- [x] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
- [x] The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
- [x] The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
- [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [x] There are no network errors such as 404s in the browser console when trying to play the stream
Steps to reproduce
https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fcustomer-hnm7f31263pk0v84.cloudflarestream.com%2Fb2090620193f05577fc6c7c6c6e6862f%2Fmanifest%2Fvideo.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
Expected behaviour
Video plays.
What actually happened?
Doesn't play in Safari. Works in Mac Chrome and Windows Chrome. It also works with native player. This is a Cloudflare stream.
Console output
[Log] Using Hls.js config: – {debug: true, enableWorker: true, lowLatencyMode: true, …} (hls-demo.js, line 24445)
{debug: true, enableWorker: true, lowLatencyMode: true, backBufferLength: 90}Object
[Log] [log] > – "Debug logs enabled for \"Hls instance\" in hls.js version 1.5.20" (hls.js, line 555)
[Log] [log] > – "stopLoad" (hls.js, line 28791)
[Log] [log] > – "loadSource:https://customer-hnm7f31263pk0v84.cloudflarestream.com/b2090620193f05577fc6c7c6c6e6862f/manifest/video.m3u8" (hls.js, line 28754)
[Log] [log] > – "[stream-controller]:" – "Trigger BUFFER_RESET" (hls.js, line 27799)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "attachMedia" (hls.js, line 28726)
[Log] [log] > – "[buffer-controller]" – "created media source: ManagedMediaSource" (hls.js, line 18461)
[Log] [log] > – "[buffer-controller]" – "Media source opened" (hls.js, line 18346)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Warning] [warn] > (hls.js, line 25509)
"Timeout while loading https://customer-hnm7f31263pk0v84.cloudflarestream.com/b2090620193f05577fc6c7c6c6e6862f/manifest/video.m3u8, retrying 1/2 in 0ms"
[Log] [log] > – "[level-controller]:" – "manifest loaded, 1 level(s) found, first bitrate: 143848" (hls.js, line 26473)
[Log] [log] > – "[buffer-controller]" – "2 bufferCodec event(s) expected" (hls.js, line 18453)
[Log] [log] > – "startLoad(-1)" (hls.js, line 28776)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "[level-controller]:" – "Switching to level 0 (2p SDR avc1,mp4a @143848) from level -1" (hls.js, line 26687)
[Log] [log] > – "[audio-track-controller]:" – "Updating audio tracks, 1 track(s) found in group(s): group_audio" (hls.js, line 17171)
[Log] [log] > – "[audio-track-controller]:" – "Switching to audio-track 0 \"original\" lang:en-a5930036 group:group_audio channels:undefined" (hls.js, line 17263)
[Log] [log] > – "[audio-stream-controller]:" – "Reset loading state" (hls.js, line 10655)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->WAITING_TRACK" (hls.js, line 10774)
[Log] [log] > – "[level-controller]:" – "Loading level index 0 with https://customer-hnm7f31263pk0v84.cloudflarestream.com/b2090620193f05577fc6c7c6c6e6862f/manifest/stream_t5b738fe6…" (hls.js, line 26576)
"Loading level index 0 with https://customer-hnm7f31263pk0v84.cloudflarestream.com/b2090620193f05577fc6c7c6c6e6862f/manifest/stream_t5b738fe67c923b13e56a9a3eff586058_r2001.m3u8?useVODOTFE=true&useMezzanine=true"
[Log] [log] > – "[stream-controller]:" – "STOPPED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-track-controller]:" – "loading audio-track playlist 0 \"original\" lang:en-a5930036 group:group_audio" (hls.js, line 17335)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_TRACK->STOPPED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->WAITING_TRACK" (hls.js, line 10774)
[Log] [log] > – "[subtitle-stream-controller]:" – "STOPPED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Level 0 loaded [0,52][part-52--1], cc [0, 0] duration:212" (hls.js, line 27845)
[Log] [log] > – "[buffer-controller]" – "Updating Media Source duration to 212.000" (hls.js, line 19001)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] level: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "injecting Web Worker for \"main\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ trackSwitch…" (hls.js, line 16118)
"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: true
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"main\" in hls.js version 1.5.20" (fa97dee0-9d6e-45d9-9dea-019045a45520, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.42c015/avc1.42c015]" (hls.js, line 28366)
[Log] [log] > – "[buffer-controller]" – "1 bufferCodec event(s) expected video" (hls.js, line 18622)
[Log] [log] > – "[audio-stream-controller]:" – "InitPTS for cc: 0 found from main: 892800" (hls.js, line 16343)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-track-controller]:" – "Audio track 0 \"original\" lang:en-a5930036 group:group_audio loaded [0-52]" (hls.js, line 17104)
[Log] [log] > – "[audio-stream-controller]:" – "Audio track 0 loaded [0,52][part-52--1],duration:212.0913599999999" (hls.js, line 16641)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_TRACK->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] track: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "injecting Web Worker for \"audio\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ …" (hls.js, line 16118)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: false
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"audio\" in hls.js version 1.5.20" (c3a1d7d8-d3fc-4cbd-8cfb-30c74b3c32e8, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "manifest codec:mp4a.40.2, ADTS type:2, samplingIndex:4" (hls.js, line 16234)
[Log] [log] > – "parsed codec:mp4a.40.5, rate:44100, channels:2" (hls.js, line 16234)
[Warning] [warn] > – "[mp4-remuxer]: Injecting 1 audio frame @ 0.010s due to 34 ms gap." (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Init audio buffer, container:audio/mp4, codecs[level/parsed]=[mp4a.40.2/mp4a.40.5]" (hls.js, line 16937)
[Log] [log] > – "[buffer-controller]" – "0 bufferCodec event(s) expected audio" (hls.js, line 18622)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(video/mp4;codecs=avc1.42c015)" (hls.js, line 19073)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(audio/mp4;codecs=mp4a.40.2)" (hls.js, line 19073)
[Log] [log] > – "[stream-controller]:" – "Alternate track found, use video.buffered to schedule main fragment loading" (hls.js, line 27995)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 0 of track 0 (frag:[0.010-4.051] > buffer:[0.010-4.051])" (hls.js, line 9902)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 0 of level 0 (frag:[0.000-4.000] > buffer:[0.000-4.000])" (hls.js, line 9902)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] level: 0, target: 4" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[buffer-controller]" – "Media source ended" (hls.js, line 18365)
[Log] [log] > – "[buffer-controller]" – "Media source closed" (hls.js, line 18362)
[Log] [log] > – "pause buffering" (hls.js, line 28818)
[Log] [log] > – "recoverMediaError" (hls.js, line 28841)
[Log] [log] > – "detachMedia" (hls.js, line 28737)
[Log] [log] > – "[buffer-controller]" – "media source detaching" (hls.js, line 18497)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->STOPPED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->STOPPED" (hls.js, line 10774)
[Log] [log] > – "[subtitle-stream-controller]:" – "IDLE->STOPPED" (hls.js, line 10774)
[Log] [log] > – "attachMedia" (hls.js, line 28726)
[Log] [log] > – "[buffer-controller]" – "created media source: ManagedMediaSource" (hls.js, line 18461)
[Error] The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
handleVideoEvent (hls-demo.js:25009)
[Log] [log] > – "[buffer-controller]" – "Media source opened" (hls.js, line 18346)
[Log] [log] > – "[buffer-controller]" – "Updating Media Source duration to 212.000" (hls.js, line 19001)
[Log] [log] > – "[stream-controller]:" – "STOPPED->IDLE" (hls.js, line 10774)
[Info] [info] > – "[abr] buffer is empty, optimal quality level 0" (hls.js, line 7627)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] level: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->WAITING_TRACK" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_TRACK->WAITING_INIT_PTS" (hls.js, line 10774)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "injecting Web Worker for \"main\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ trackSwitch…" (hls.js, line 16118)
"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: true
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"main\" in hls.js version 1.5.20" (bbd7e7ef-9e70-4a6c-8b90-54fe93b00742, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.42c015/avc1.42c015]" (hls.js, line 28366)
[Log] [log] > – "[buffer-controller]" – "1 bufferCodec event(s) expected video" (hls.js, line 18622)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_INIT_PTS->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] track: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "injecting Web Worker for \"audio\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ …" (hls.js, line 16118)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: false
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"audio\" in hls.js version 1.5.20" (a8ca8ad6-bca2-40ad-bd7f-29c719a8bfa9, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "manifest codec:mp4a.40.2, ADTS type:2, samplingIndex:4" (hls.js, line 16234)
[Log] [log] > – "parsed codec:mp4a.40.5, rate:44100, channels:2" (hls.js, line 16234)
[Warning] [warn] > – "[mp4-remuxer]: Injecting 1 audio frame @ 0.010s due to 34 ms gap." (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Init audio buffer, container:audio/mp4, codecs[level/parsed]=[mp4a.40.2/mp4a.40.5]" (hls.js, line 16937)
[Log] [log] > – "[buffer-controller]" – "0 bufferCodec event(s) expected audio" (hls.js, line 18622)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(video/mp4;codecs=avc1.42c015)" (hls.js, line 19073)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(audio/mp4;codecs=mp4a.40.2)" (hls.js, line 19073)
[Log] [log] > – "[stream-controller]:" – "Alternate track found, use video.buffered to schedule main fragment loading" (hls.js, line 27995)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 0 of track 0 (frag:[0.010-4.051] > buffer:[0.010-4.051])" (hls.js, line 9902)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] track: 0, target: 4.051" (hls.js, line 10027)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 0 of level 0 (frag:[0.000-4.000] > buffer:[0.000-4.000])" (hls.js, line 9902)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] level: 0, target: 4" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[buffer-controller]" – "Media source ended" (hls.js, line 18365)
[Log] [log] > – "[buffer-controller]" – "Media source closed" (hls.js, line 18362)
[Log] [log] > – "pause buffering" (hls.js, line 28818)
[Log] [log] > – "swapAudioCodec" (hls.js, line 28830)
[Log] [log] > – "recoverMediaError" (hls.js, line 28841)
[Log] [log] > – "detachMedia" (hls.js, line 28737)
[Log] [log] > – "[buffer-controller]" – "media source detaching" (hls.js, line 18497)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->STOPPED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->STOPPED" (hls.js, line 10774)
[Log] [log] > – "attachMedia" (hls.js, line 28726)
[Log] [log] > – "[buffer-controller]" – "created media source: ManagedMediaSource" (hls.js, line 18461)
[Error] The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
handleVideoEvent (hls-demo.js:25009)
[Log] [log] > – "[buffer-controller]" – "Media source opened" (hls.js, line 18346)
[Log] [log] > – "[buffer-controller]" – "Updating Media Source duration to 212.000" (hls.js, line 19001)
[Log] [log] > – "[stream-controller]:" – "STOPPED->IDLE" (hls.js, line 10774)
[Info] [info] > – "[abr] buffer is empty, optimal quality level 0" (hls.js, line 7627)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] level: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->WAITING_TRACK" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_TRACK->WAITING_INIT_PTS" (hls.js, line 10774)
[Log] [log] > – "resume buffering" (hls.js, line 28805)
[Log] [log] > – "[stream-controller]:" – "Swapping audio codec" (hls.js, line 28142)
[Log] [log] > – "injecting Web Worker for \"main\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ trackSwitch…" (hls.js, line 16118)
"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: true
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"main\" in hls.js version 1.5.20" (95a54970-3ab4-4bd4-abe2-7cc1ca12c6fb, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.42c015/avc1.42c015]" (hls.js, line 28366)
[Log] [log] > – "[buffer-controller]" – "1 bufferCodec event(s) expected video" (hls.js, line 18622)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_INIT_PTS->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] track: 0, target: 0" (hls.js, line 10027)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "injecting Web Worker for \"audio\"" (hls.js, line 16017)
[Log] [log] > – "[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵ discontinuity: true↵ …" (hls.js, line 16118)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: false
timeOffset: 0
initSegmentChange: true"
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 9758)
[Log] [log] > – "Debug logs enabled for \"audio\" in hls.js version 1.5.20" (6286d7b2-8efb-416c-bba4-31d748bfd348, line 555)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js, line 16234)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 16234)
[Log] [log] > – "manifest codec:mp4a.40.2, ADTS type:2, samplingIndex:4" (hls.js, line 16234)
[Log] [log] > – "parsed codec:mp4a.40.5, rate:44100, channels:2" (hls.js, line 16234)
[Warning] [warn] > – "[mp4-remuxer]: Injecting 1 audio frame @ 0.010s due to 34 ms gap." (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Init audio buffer, container:audio/mp4, codecs[level/parsed]=[mp4a.40.2/mp4a.40.5]" (hls.js, line 16937)
[Log] [log] > – "[buffer-controller]" – "0 bufferCodec event(s) expected audio" (hls.js, line 18622)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(video/mp4;codecs=avc1.42c015)" (hls.js, line 19073)
[Log] [log] > – "[buffer-controller]" – "creating sourceBuffer(audio/mp4;codecs=mp4a.40.2)" (hls.js, line 19073)
[Log] [log] > – "[stream-controller]:" – "Alternate track found, use video.buffered to schedule main fragment loading" (hls.js, line 27995)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 16234)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 0 of track 0 (frag:[0.010-4.051] > buffer:[0.010-4.051])" (hls.js, line 9902)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] track: 0, target: 4.051" (hls.js, line 10027)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 0 of level 0 (frag:[0.000-4.000] > buffer:[0.000-4.000])" (hls.js, line 9902)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js, line 10774)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] level: 0, target: 4" (hls.js, line 10027)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 10774)
[Log] [log] > – "[buffer-controller]" – "Media source ended" (hls.js, line 18365)
[Log] [log] > – "[buffer-controller]" – "Media source closed" (hls.js, line 18362)
[Log] [log] > – "pause buffering" (hls.js, line 28818)
[Error] The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
handleVideoEvent (hls-demo.js:25009)
[Log] [log] > – "[stream-controller]:" – "Swapping audio codec" (hls.js, line 28142)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 1 of level 0" (hls.js, line 9758)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 10774)
[Warning] [warn] > – "[buffer-operation-queue]: Exception executing \"video\" SourceBuffer operation: InvalidStateError: The object is in an invalid state." (hls.js, line 18273)
[Warning] [warn] > – "[buffer-controller]" – "Failed 1/3 times to append segment in \"video\" sourceBuffer" (hls.js, line 18756)
[Warning] [warn] > – "Could not resolve bufferAppendError (\"The object is in an invalid state.\") with content-steering for Pathway: . levels: 1 priorities: [\".\"…" (hls.js, line 24994)
"Could not resolve bufferAppendError (\"The object is in an invalid state.\") with content-steering for Pathway: . levels: 1 priorities: [\".\"] penalized: {\".\":32161}"
[Log] [log] > – "[stream-controller]:" – "Reset loading state" (hls.js, line 10655)
[Log] [log] > – "[stream-controller]:" – "PARSING->IDLE" (hls.js, line 10774)
[Log] [log] > – "stopLoad" (hls.js, line 28791)
[Log] [log] > – "[stream-controller]:" – "IDLE->STOPPED" (hls.js, line 10774)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->STOPPED" (hls.js, line 10774)
[Warning] Error event: – {type: "mediaError", parent: "main", details: "bufferAppendError", …} (hls-demo.js, line 24783)
{type: "mediaError", parent: "main", details: "bufferAppendError", sourceBufferName: "video", frag: Fragment, …}Object
[Error] Fatal error : bufferAppendError
(anonymous function) (hls-demo.js:24858)
emit (hls.js:15647)
onError (hls.js:18761)
executeNext (hls.js:18274)
append (hls.js:18242)
onBufferAppending (hls.js:18764)
emit (hls.js:15647)
bufferFragmentData (hls.js:10179)
_handleTransmuxComplete (hls.js:28272)
handleTransmuxComplete (hls.js:16260)
onWorkerMessage (hls.js:16222)
[Error] InvalidStateError: The object is in an invalid state.
checkBuffer (hls-demo.js:25138:96)
Chrome media internals output
Turns out the issue was using a 2x2 video, switching to 16x16 solved the issues. Yet another stupid Webkit limitation.
There's nothing hls.js could do to play the video. You can file an Feedback Assistant bug report, including why 2x2 video should play.
Is there a reason to play the 2x2 video? Would an acceptable solution be to drop the video from the HLS asset so that it is audio-only?
The reason it is a 2x2 is because:
- we have to use Cloudflare Streams and they don't support audio uploads, so we convert them to videos first
- I'm creating a black 2x2 image on the fly in the same command using ffmpeg, turns out that's the minimum, 1x1 is failing.
I'm using audio-only mode on the client side (only in Vidstack, possibly it isn't instructing HLS.js to do the same), but due to CF I have no control over the manifest.
I understand there's nothing HLS.js can do about this, let's close the issue.
You could try replacing each Level url with the audio playlist url on manifest loaded or parsed. v1.6 recognizes variant and alt media playlists with the same url as audio-only renditions.