Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fb9b6139ada37294400d2a7d4edcff97bb15c1c8
      
https://github.com/WebKit/WebKit/commit/fb9b6139ada37294400d2a7d4edcff97bb15c1c8
  Author: Enrique Ocaña González <[email protected]>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  [HTMLMediaElement] Reschedule timeupdate event if fired too early
https://bugs.webkit.org/show_bug.cgi?id=279055

Reviewed by Xabier Rodriguez-Calvar.

HTMLMediaElement fires 'timeupdate' every 250ms in repeating timer. If the
timer is fired before 250ms from the last occurrence, it is silently skipped
and needs to wait for another 250ms. As a result, the gap between two
following timeupdate events may vary 250-500ms.

This may happen in two cases:

1) Non-periodic timeupdate event is scheduled for any reason.
2) When the difference between two timer calls is lower than 250ms. This may
happen when there are multiple timers to handle at the same time in
ThreadTimers (maxDurationOfFiringTimers).

Original author: Andrzej Surdej <[email protected]>

See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1392

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Schedule next event on 
the remaining time difference so that maxTimeupdateEventFrequency is honored, 
instead of waiting a full cycle.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to