[Webkit-unassigned] [Bug 277621] New: iOS Safari video element doesn't handle partial blob correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 4 23:56:26 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=277621

            Bug ID: 277621
           Summary: iOS Safari video element doesn't handle partial blob
                    correctly.
           Product: WebKit
           Version: Safari 16
          Hardware: iPhone / iPad
                OS: iOS 16
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: youcheng321 at 126.com

Created attachment 472060

  --> https://bugs.webkit.org/attachment.cgi?id=472060&action=review

Screen Record

I converted an m3u8 text into a blob and assigned it to a video. The blob returns a 206 Partial Content, but the video triggers an error event. It seems that it cannot handle a 206-status blob response.
This happens in iOS15/16 but work fine in iOS17 and Mac Safari 17.5

Is there any way to force video handle blob m3u8 correctly, or make blob response 200 full content instead of 206 partial content?


Here is my demo code:

<body>
  <video controls id="player"></video>
  <script>
    const player = document.querySelector('#player');
    player.addEventListener('error', () => {
      console.log('Video error:', player.error)
    })

    fetch('https://test-streams.mux.dev/x36xhzz/url_6/193039199_mp4_h264_aac_hq_7.m3u8')
      .then(res => res.text())
      .then(m3u8 => {
        const blob = new Blob([m3u8], { type: 'application/vnd.apple.mpegurl' });
        const blobUrl = URL.createObjectURL(blob);
        player.src = blobUrl;
      })
  </script>
</body>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240805/779ce95a/attachment.htm>


More information about the webkit-unassigned mailing list