video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.94k stars 2.59k forks source link

Apple AirPlay only plays Audio in Safari on iPadOS #5989

Open benunternaehrer opened 12 months ago

benunternaehrer commented 12 months ago

What version of Hls.js are you using?

1.4.12

What browser (including version) are you using?

Safari 17.1.1

What OS (including version) are you using?

iPadOS 17.1.1

Test stream

https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8

Configuration

{}

Additional player setup steps

<video id="video" controls x-webkit-airplay="allow" playsinline></video>

Checklist

Steps to reproduce

  1. Play the Video on iPad Safari
  2. Initiate AirPlay

Expected behaviour

Video playback works via AirPlay with Audio and Video

(Same stream works for example with video.js)

What actually happened?

Only Audio is streamed to AirPlay device, Video continues to play on iPad.

Console output

[Log] [log] > – "Debug logs enabled for \"Hls instance\" in hls.js version 1.4.12" (hls.js@1.4.12, line 1)
[Log] [log] > – "stopLoad" (hls.js@1.4.12, line 1)
[Log] [log] > – "loadSource:https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Trigger BUFFER_RESET" (hls.js@1.4.12, line 1)
[Log] [log] > – "attachMedia" (hls.js@1.4.12, line 1)
[Log] [log] > – "[level-controller]:" – "manifest loaded, 6 level(s) found, first bitrate: 628000" (hls.js@1.4.12, line 1)
[Log] [log] > – "2 bufferCodec event(s) expected" (hls.js@1.4.12, line 1)
[Log] [log] > – "startLoad(-1)" (hls.js@1.4.12, line 1)
[Log] [log] > – "[level-controller]:" – "Switching to level 0 from level -1" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-track-controller]:" – "Updating audio tracks, 1 track(s) found in group:audio" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-track-controller]:" – "Switching to audio-track 0 \"English stereo\" lang:en group:audio" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Reset loading state" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[level-controller]:" – "Loading level index 0 with URI 1/1 https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_…" (hls.js@1.4.12, line 1)
"Loading level index 0 with URI 1/1 https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_180_250000.m3u8"
[Log] [log] > – "[stream-controller]:" – "STOPPED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-track-controller]:" – "loading audio-track playlist 0 \"English stereo\" lang:en group:audio" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->STOPPED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "STOPPED->WAITING_TRACK" (hls.js@1.4.12, line 1)
[Log] [log] > – "[subtitle-stream-controller]:" – "STOPPED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Level 0 loaded [0,52][part-52--1], cc [0, 0] duration:210" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-track-controller]:" – "audio-track 0 \"English stereo\" lang:en group:audio loaded [0-53]" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Track 0 loaded [0,53][part-53--1],duration:211.42700000000013" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_TRACK->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[buffer-controller]: Media source opened" (hls.js@1.4.12, line 1)
[Log] [log] > – "[buffer-controller]: Updating Media Source duration to 210.000" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 0 cc: 0 of [0-52] level: 0, target: 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 0 cc: 0 of [0-53] track: 0, target: 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "injecting Web Worker for \"main\"" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵        discontinuity: true↵        trackSwitch…" (hls.js@1.4.12, line 1)
"[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@1.4.12, line 1)
[Log] [log] > – "injecting Web Worker for \"audio\"" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Unknown video PTS for cc 0, waiting for video PTS before demuxing audio frag 0 of [0 ,53],track 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->WAITING_INIT_PTS" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "Debug logs enabled for \"audio\" in hls.js version 1.4.12" (eb602026-dc73-4a0b-9387-0a686ea10aeb, line 1)
[Log] [log] > – "Debug logs enabled for \"main\" in hls.js version 1.4.12" (8174228a-3ff3-44cd-bf7c-944d88630f09, line 1)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.42c00d/avc1.4d400d]" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "InitPTS for cc: 0 found from main: 7200" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "WAITING_INIT_PTS->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵        discontinuity: true↵      …" (hls.js@1.4.12, line 1)
"[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] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js@1.4.12, line 1)
[Log] [log] > – "manifest codec:mp4a.40.2, ADTS type:2, samplingIndex:3" (hls.js@1.4.12, line 1)
[Log] [log] > – "parsed codec:mp4a.40.5, rate:48000, channels:2" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Init audio buffer, container:audio/mp4, codecs[parsed]=[mp4a.40.5]" (hls.js@1.4.12, line 1)
[Log] [log] > – "[buffer-controller]: creating sourceBuffer(video/mp4;codecs=avc1.42c00d)" (hls.js@1.4.12, line 1)
[Log] [log] > – "[buffer-controller]: creating sourceBuffer(audio/mp4;codecs=mp4a.40.5)" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Alternate track found, use video.buffered to schedule main fragment loading" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 0 of level 0 (frag:[0.000-4.000] > buffer:[0.000-4.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Adapting to level 5 from level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[level-controller]:" – "Switching to level 5 from level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[level-controller]:" – "Loading level index 5 with URI 1/1 https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_…" (hls.js@1.4.12, line 1)
"Loading level index 5 with URI 1/1 https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_video_1080_4800000.m3u8"
[Log] [log] > – "[stream-controller]:" – "IDLE->WAITING_LEVEL" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 0 of track 0 (frag:[0.000-3.883] > buffer:[0.000-3.883])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 1 cc: 0 of [0-53] track: 0, target: 3.883" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Level 5 loaded [0,52][part-52--1], cc [0, 0] duration:210" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "WAITING_LEVEL->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 1 cc: 0 of [0-52] level: 5, target: 4" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 1 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 1 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 1 of track 0 (frag:[3.883-7.851] > buffer:[0.000-7.851])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 2 cc: 0 of [0-53] track: 0, target: 7.851" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 2 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 2 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 2 of track 0 (frag:[7.851-11.819] > buffer:[0.000-11.819])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 1 p: -1 level: 5 id: 1↵        discontinuity: false↵      …" (hls.js@1.4.12, line 1)
"[transmuxer-interface, main]: Starting new transmux session for sn: 1 p: -1 level: 5 id: 1
        discontinuity: false
        trackSwitch: true
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 4
        initSegmentChange: false"
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 1 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: ISGenerated flag reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: initPTS & initDTS reset" (hls.js@1.4.12, line 1)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.42c00d/avc1.4d4032]" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 1 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 1 of level 5 (frag:[4.000-8.000] > buffer:[0.000-8.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 2 cc: 0 of [0-52] level: 5, target: 8" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 3 cc: 0 of [0-53] track: 0, target: 11.819" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 2 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 3 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 3 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 3 of track 0 (frag:[11.819-15.787] > buffer:[0.000-15.787])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 2 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 2 of level 5 (frag:[8.000-12.000] > buffer:[0.000-12.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 3 cc: 0 of [0-52] level: 5, target: 12" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 3 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 3 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 3 of level 5 (frag:[12.000-16.000] > buffer:[0.000-16.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 4 cc: 0 of [0-52] level: 5, target: 16" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 4 cc: 0 of [0-53] track: 0, target: 15.787" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 4 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 4 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 4 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 4 of track 0 (frag:[15.787-19.755] > buffer:[0.000-19.755])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 5 cc: 0 of [0-53] track: 0, target: 19.755" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 5 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 4 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 5 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 4 of level 5 (frag:[16.000-20.000] > buffer:[0.000-20.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 5 cc: 0 of [0-52] level: 5, target: 20" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 5 of track 0 (frag:[19.755-23.723] > buffer:[0.000-23.723])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 6 cc: 0 of [0-53] track: 0, target: 23.723" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 6 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 6 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 6 of track 0 (frag:[23.723-27.691] > buffer:[0.000-27.691])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 5 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 5 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 5 of level 5 (frag:[20.000-24.000] > buffer:[0.000-24.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 6 cc: 0 of [0-52] level: 5, target: 24" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 6 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 6 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 7 cc: 0 of [0-53] track: 0, target: 27.691" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 6 of level 5 (frag:[24.000-28.000] > buffer:[0.000-28.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 7 cc: 0 of [0-52] level: 5, target: 28" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 7 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 7 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 7 of track 0 (frag:[27.691-31.659] > buffer:[0.000-31.659])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 7 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 7 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 7 of level 5 (frag:[28.000-32.000] > buffer:[0.000-32.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 8 cc: 0 of [0-52] level: 5, target: 32" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 8 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 8 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 8 of level 5 (frag:[32.000-36.000] > buffer:[0.000-36.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 9 cc: 0 of [0-52] level: 5, target: 36" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 8 cc: 0 of [0-53] track: 0, target: 31.659" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 8 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 8 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 8 of track 0 (frag:[31.659-35.627] > buffer:[0.000-35.627])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 9 cc: 0 of [0-53] track: 0, target: 35.627" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 9 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 9 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 9 of track 0 (frag:[35.627-39.595] > buffer:[0.000-39.595])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 9 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 9 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 9 of level 5 (frag:[36.000-40.000] > buffer:[0.000-40.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 10 cc: 0 of [0-52] level: 5, target: 40" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 10 cc: 0 of [0-53] track: 0, target: 39.595" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 10 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 10 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 10 of track 0 (frag:[39.595-43.563] > buffer:[0.000-43.563])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 10 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 10 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 10 of level 5 (frag:[40.000-44.000] > buffer:[0.000-44.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 11 cc: 0 of [0-52] level: 5, target: 44" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 11 cc: 0 of [0-53] track: 0, target: 43.563" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 11 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 11 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 11 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 11 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 11 of track 0 (frag:[43.563-47.531] > buffer:[0.000-47.531])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 11 of level 5 (frag:[44.000-48.000] > buffer:[0.000-48.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 12 cc: 0 of [0-52] level: 5, target: 48" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 12 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 12 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 12 of level 5 (frag:[48.000-52.000] > buffer:[0.000-52.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 12 cc: 0 of [0-53] track: 0, target: 47.531" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 12 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 12 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 12 of track 0 (frag:[47.531-51.499] > buffer:[0.000-51.499])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 13 cc: 0 of [0-53] track: 0, target: 51.499" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 13 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 13 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 13 of track 0 (frag:[51.499-55.467] > buffer:[0.000-55.467])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 13 cc: 0 of [0-52] level: 5, target: 52" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 13 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 13 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 13 of level 5 (frag:[52.000-56.000] > buffer:[0.000-56.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 14 cc: 0 of [0-53] track: 0, target: 55.467" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 14 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 14 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 14 of track 0 (frag:[55.467-59.435] > buffer:[0.000-59.435])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 14 cc: 0 of [0-52] level: 5, target: 56" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 14 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 14 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 14 of level 5 (frag:[56.000-60.000] > buffer:[0.000-60.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 15 cc: 0 of [0-53] track: 0, target: 59.435" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 15 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 15 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 15 of track 0 (frag:[59.435-63.403] > buffer:[0.000-63.403])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loading fragment 15 cc: 0 of [0-52] level: 5, target: 60" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 15 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 15 of level 5" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 15 of level 5 (frag:[60.000-64.000] > buffer:[0.000-64.000])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 16 cc: 0 of [0-53] track: 0, target: 63.403" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 16 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js@1.4.12, line 1)
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 16 of level 0" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 16 of track 0 (frag:[63.403-67.371] > buffer:[0.000-67.371])" (hls.js@1.4.12, line 1)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js@1.4.12, line 1)

Chrome media internals output

No response

robwalch commented 12 months ago

v1.5 adds support for Managed Media Source (MMS) in Safari 17.1 and up. AirPlay is disabled by default to enable MMS over MSE. An AirPlay source alternative must be appended to your media element with the .m3u8 URL following the MediaSource blob:// source element (after calling Hls loadSource and attach). More information can be found here:

https://webkit.org/blog/14735/webkit-features-in-safari-17-1/

benunternaehrer commented 12 months ago

Not sure it's only related to Safari 17.1 as the problem also occurs on Safari 16.6 with tvOS 17.1. Either way, using the native HLS support in Safari instead of hls.js solves the problem for me. But would be good to have it working with hls.js. Adding a source to the video element seems to prioritize native HLS playback over hls.js.

robwalch commented 12 months ago

When you load an item and attach a media element, a MediaSource source element is added (in Safari using the latest pre-release of hls.js):

hls.loadSource('https://yourdomain.com/video/main.m3u8');
hls.attachMedia(video);

result after calling loadSource and attachMedia:

<video playsinline>
  <source type="video/mp4" src="blob://afe253ef-111e-4eaa-90ea-c8ebfa786510">
</video>

To enable AirPlay, after attaching media and loading, append an m3u8 source and re-enable remote playback:

const source = document.createElement('source');
source.src = url;
video.appendChild(source);
video.disableRemotePlayback = false;

final result with an alternative source:

<video playsinline>
  <source type="video/mp4" src="blob://afe253ef-111e-4eaa-90ea-c8ebfa786510">
  <source src="https://yourdomain.com/video/main.m3u8">
</video>

AirPlay requires an m3u8 URL for a remote device to load the media. MSE players use a “blob” URL, which connects the MediaSource to the DOM element used for playback but does not expose the m3u8 location needed for streaming remotely. Adding an alternative (fallback) source, as shown above, allows Safari 17 and up to use the correct path for remote playback.

The only way to AirPlay HLS in older versions of Safari is with native HLS playback.