[webkit-changes] [WebKit/WebKit] bc79ba: [media-controls] buffered data indicator looks wro...

Antoine Quint noreply at github.com
Wed Mar 22 07:26:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bc79ba5a3d3e70b9dbddb3967f2c58ff96abdfa2
      https://github.com/WebKit/WebKit/commit/bc79ba5a3d3e70b9dbddb3967f2c58ff96abdfa2
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M Source/WebCore/Modules/modern-media-controls/media/scrubbing-support.js

  Log Message:
  -----------
  [media-controls] buffered data indicator looks wrong when scrubbing back
https://bugs.webkit.org/show_bug.cgi?id=254217

Reviewed by Dean Jackson and Devin Rousso.

The HTMLMediaElement.buffered API provides a list of time ranges that are buffered. Until now, we would find the
highest value in all of the ranges and use that value to draw the buffered data indicator in the time scrubber.

This means that if the user would start playing a video, scrub forward, let the video play a bit to buffer some data
around that time, and then scrub backwards, the buffered data indicator would be misleading as it would indicate that
data was buffered all the way to that previous current time. Eventually, this would fix itself since the implementation
probably drops the buffered data if way past the current time.

We now only consider the buffered range that contains the current time, which means that the buffered data indicator fills
up nicely when playing linearly, but also snaps back to the current time when we scrub backwards.

* Source/WebCore/Modules/modern-media-controls/media/scrubbing-support.js:
(ScrubbingSupport.prototype.syncControl):
(ScrubbingSupport):

Canonical link: https://commits.webkit.org/261963@main




More information about the webkit-changes mailing list