Bug 256985 - [ManagedMSE] bufferedchange event should pass the list of changes
Summary: [ManagedMSE] bufferedchange event should pass the list of changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-18 14:35 PDT by Jean-Yves Avenard [:jya]
Modified: 2023-05-24 05:18 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.