Bug 256639

Summary: ManagedMediaSource emits stream start and end events during live playback with short forward buffer
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Jean-Yves Avenard [:jya]
Reported 2023-05-11 03:41:35 PDT
ManagedMediaSource emits stream start and end events during live playback with short forward buffer. OS: macOS Ventura 13.3 (22E243) Browser: Safari Technology Preview Release 169 (Safari 16.4, WebKit 18616.1.12.2) Steps: 1. Navigate to hls.js demo page with support for ManagedMediaSource https://imgdry.apple.com/users/rwalch/hlsjs-oss/v/1.4.1-pre.1.mms/demo/?src=https%3A%2F%2Fcdn-vos-ppp-01.vos360.video%2FContent%2FHLS_HLSCLEAR%2FLive%2Fchannel(PPP-LL-2HLS)%2Findex.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF0dGFjaE1lZGlhT25TdGFydCI6dHJ1ZSwiYXV0b1JlY292ZXJFcnJvciI6ZmFsc2UsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ== 2. Observe Live playback with “Status: “ log lines 3. If playback does not start automatically, mute the player and reload the page so that playback remains at the live edge with low buffer (as long as the muted element remains visible within the viewport) Actual results: - Page may become unresponsive within a few seconds - Page shows ManagedMediaSource “startstreaming” and “endstreaming” events firing very frequently: 73.694 | ManagedMediaSource "endstreaming" event 77.999 | ManagedMediaSource "startstreaming" event 79.379 | ManagedMediaSource "endstreaming" event Expected: “endstreaming” does not fire when forward buffer remains below certain threshold (like under 20 seconds, or in this example under 6). Instead I would expect the browser to eject media from the buffer behind the playhead. When playing a live stream the forward buffer remains below a certain threshold; under 5 seconds for low-latency playback, and typically under 30 for standard HLS assets. It is disruptive for MMS to emit these events .
Attachments
Jean-Yves Avenard [:jya]
Comment 1 2023-05-11 03:41:50 PDT
Jean-Yves Avenard [:jya]
Comment 2 2023-05-11 04:18:01 PDT
EWS
Comment 3 2023-05-11 14:49:18 PDT
Committed 263984@main (252b97f1b34b): <https://commits.webkit.org/263984@main> Reviewed commits have been landed. Closing PR #13755 and removing active labels.
Jean-Yves Avenard [:jya]
Comment 4 2023-09-29 23:57:59 PDT
*** Bug 253637 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.