Bug 256985

Summary: [ManagedMSE] bufferedchange event should pass the list of changes
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   

Description Jean-Yves Avenard [:jya] 2023-05-18 14:35:32 PDT
The expensive part of handling the buffered change event (and updateend) is determining what if anything has changed after iterating through SourceBuffer.buffered TimeRanges.

Just knowing at a glance if the change included appends and/or removal would be a huge time savings as we could skip all the work looking for removal if there was none, and we could avoid duplicating work done on updateend.

The internal code knows exactly what was added and removed ; we should pass this information to the bufferedchange event as a dictionary of TimeRanges added and removed.

This would greatly simplify the code of web players.
Comment 1 Radar WebKit Bug Importer 2023-05-18 14:35:56 PDT
<rdar://problem/109532732>
Comment 2 Jean-Yves Avenard [:jya] 2023-05-22 06:35:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14176
Comment 3 EWS 2023-05-24 05:17:59 PDT
Committed 264472@main (03f910f7ebd4): <https://commits.webkit.org/264472@main>

Reviewed commits have been landed. Closing PR #14176 and removing active labels.