| Summary: | Video hides when on last frame and changing page visibility | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tom Bigelajzen <tombigel> | ||||
| Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED CONFIGURATION CHANGED | ||||||
| Severity: | Normal | CC: | cdumez, jer.noble, peng.liu6, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 11 | ||||||
| Hardware: | Mac | ||||||
| OS: | macOS 10.13 | ||||||
| Attachments: |
|
||||||
|
Description
Tom Bigelajzen
2018-07-08 02:26:38 PDT
On Safari Technology Preview release 89, this bug is not reproducible. The last video frame will always be there when we switch tab or application window back and forth.
About the inconsistent behavior of skipping to the last frame, I can only reproduce the inconsistency with some long video files, e.g., the big Bucky bunny video whose duration is almost 10 minutes. For short videos (~10s), the skipping to the last frame is always showing the last frame.
I would suggest implementing the skipping to the last frame by setting the currentTime attribute of the video element to a value which is little smaller than the duration.
Example code is below:
==================================================================
// This line will only work consistently when the video file is very short (~10 seconds)
skip.addEventListener('click', () => video.currentTime = video.duration)
// Below line will always skip to the last frame
skip.addEventListener('click', () => video.currentTime = video.duration - 0.01)
==================================================================
|