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: | Media | Assignee: | 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]
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Jean-Yves Avenard [:jya]
rdar://108914679
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/13755
EWS
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]
*** Bug 253637 has been marked as a duplicate of this bug. ***