Bug 255772 - REGRESSION (Safari 15): HTMLVideoElement exposing wrong currentTime when calling play() and pause() back-to-back
Summary: REGRESSION (Safari 15): HTMLVideoElement exposing wrong currentTime when call...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-21 02:41 PDT by Andreas Kogler
Modified: 2023-04-23 14:28 PDT (History)
3 users (show)

See Also:


Attachments
Testpage for reproduction (913 bytes, text/html)
2023-04-21 02:41 PDT, Andreas Kogler
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kogler 2023-04-21 02:41:44 PDT
Created attachment 466028 [details]
Testpage for reproduction

When calling `play()` and `pause()` in quick succession on an HTMLVideoElement after page load, the exposed `currentTime` jumps to a nonsensical value.

Looks like an internal timer gets exposed instead of the actual `currentTime`. 
Reproduction steps:

1. Open a web-page that has an HTMLVideoElement `muted` and with any `src` (HLS or progressive) loaded
3. Open the console
4. Wait for 10 seconds
3. Call `play()` and `pause()` on the video element
4. Observe that the `currentTime` is now close to 10 (instead of 0); Note: if you wait 20 seconds in step 4, the `currentTime` is going to be close to 20 etc.


Issue starts to occur on Safari 15 and still exists in Safari 16. Also tested and verified same behaviour with Orion browser(WebKit  615.1.16.1).

The attached test-page executes all steps for you. It waits for 10 seconds and then calls `play()` and `pause()` back-to-back, logging the `currentTime` every 200ms.
Comment 1 Radar WebKit Bug Importer 2023-04-23 14:28:42 PDT
<rdar://problem/108430206>