8000 Fix duplicate timeupdate events in Text Track Code · WebKit/WebKit@afdf40a · GitHub
[go: up one dir, main page]

Skip to content

Commit afdf40a

Browse files
Ahmad-S792
authored andcommitted
Fix duplicate timeupdate events in Text Track Code
Fix duplicate timeupdate events in Text Track Code https://bugs.webkit.org/show_bug.cgi?id=250741 Reviewed by Eric Carlson. Merge - https://chromium.googlesource.com/chromium/blink/+/fd62a2259d085146f7fb275f99edb80e0e80243b This change prevents duplicate timeupdate events caused by the text track code. The comment above the call indicates that the timeupdate event should have the same restrictions as the normal periodic timeupdate event. By changing the parameter passed to scheduleTimeupdateEvent() to true, the event rate limiting guards are properly applied to this call and duplicate events won't fire. * Source/WebCore/html/HTMLMediaElement.cpp: (HTMLMediaElement::updateActiveTextTrackCues): Update 'scheduleTimeUpdateEvent' to 'true' to have event rate limit Canonical link: https://commits.webkit.org/259023@main
1 parent 6c91a81 commit afdf40a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/WebCore/html/HTMLMediaElement.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
* Copyright (C) 2007-2022 Apple Inc. All rights reserved.
2+
* Copyright (C) 2007-2023 Apple Inc. All rights reserved.
3+
* Copyright (C) 2014 Google Inc. All rights reserved.
34
*
45
* Redistribution and use in source and binary forms, with or without
56
* modification, are permitted provided that the following conditions
@@ -1773,7 +1774,7 @@ void HTMLMediaElement::updateActiveTextTrackCues(const MediaTime& movieTime)
17731774
// fired as part of the overall process of changing the current playback
17741775
// position.)
17751776
if (!m_paused && m_lastSeekTime <= lastTime)
1776-
scheduleTimeupdateEvent(false);
1777+
scheduleTimeupdateEvent(true);
17771778

17781779
// Explicitly cache vector sizes, as their content is constant from here.
17791780
size_t currentCuesSize = currentCues.size();

0 commit comments

Comments
 (0)
0