WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
287430
Playing video in Safari can generate non-monotonic 'timeupdate' events
https://bugs.webkit.org/show_bug.cgi?id=287430
Summary
Playing video in Safari can generate non-monotonic 'timeupdate' events
Rob Smith
Reported
2025-02-10 13:22:01 PST
Created
attachment 474184
[details]
Event log showing that 'timeupdate' event times do not increase monotonically # Description Playing video in Safari can generate non-monotonic 'timeupdate' events # Steps to reproduce 1. Load the video in the web page attached to see the event log. 2. Press the Safari play control to play the video to the end (only 5 secs long). 3. Note that 'timeupdate' event times increase monotonically in the event log. 4. Repeat step 2. 5. Note that 'timeupdate' event times do not increase monotonically in the event log - see example screenshot. # Expected result Event times of 'timeupdate' events should always increase monotonically when the video is played. The expected result is observed when the test is performed using either Firefox 128.5.2esr(64-bit) or Chrome 131.0.6778.140. # Actual result Event times of 'timeupdate' events do not always increase monotonically when the video is played in Safari 18.2(20620.1.16.11.8). # Further details The steps 1-5 above are the simplest way to reproduce the error - press play, wait and press play again - because there are only two user actions required. However, I've traced the cause to the seek operation in Safari. There is an implicit seek from the end of the first play operation back to the start of the second play operation. There are many other ways to reproduce the same error. Any sequence of actions which cause a seek operation produce a similar result. For instance: a. Play, pause, seek to start (time 0) and then play. b. Play, wait for the first few 'timeupdate' events and then seek to start so play restarts automatically. c. Play, pause, seek forwards or backwards and then resume play. d. Play, seek forwards or backwards so play resumes automatically at the new time. The seek operation in the steps a-d above can be triggered either by clicking on Safari's video timeline bar, or by clicking Safari's skip 15 second buttons, or by using the custom buttons in the attached web page to set the HTMLMediaElement.currentTime directly in Javascript. This behaviour is not unique to the example video file provided. Repeating these tests in Firefox or Chrome also produces the expected results above. This error is not observed in Safari if the seek operation is omitted. For instance: i. Load the page and play the video. ii. Wait for the first few 'timeupdate' events and then pause before the end of the video. iii. Resume the video without seeking. iv. Note that 'timeupdate' event times always increase monotonically as expected - in contrast to test c above.
Attachments
Event log showing that 'timeupdate' event times do not increase monotonically
(3.33 MB, image/png)
2025-02-10 13:22 PST
,
Rob Smith
no flags
Details
Sample web page used to demonstrate bug and generate screenshot
(1.01 MB, application/zip)
2025-02-10 13:23 PST
,
Rob Smith
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Rob Smith
Comment 1
2025-02-10 13:23:55 PST
Created
attachment 474185
[details]
Sample web page used to demonstrate bug and generate screenshot
Radar WebKit Bug Importer
Comment 2
2025-02-17 13:22:16 PST
<
rdar://problem/145004818
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug