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.
<rdar://problem/109532732>
Pull request: https://github.com/WebKit/WebKit/pull/14176
Committed 264472@main (03f910f7ebd4): <https://commits.webkit.org/264472@main> Reviewed commits have been landed. Closing PR #14176 and removing active labels.