| Summary: | REGRESSION: Video element disappears after setting currentTime to 0 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Johannes Odland <johannes.odland> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | REOPENED --- | ||
| Severity: | Normal | CC: | ahmad.saleem792, dburkart, eric.carlson, hunter, jer.noble, johannes.odland, karlcow, webkit-bug-importer, westbrook.johnson |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 14 | ||
| Attachments: | |||
|
Description
Johannes Odland
2021-05-18 23:55:26 PDT
The video element doesn't disappear, the poster frame is hidden and the first frame of the video happens to be black. This is the correct behavior according to the HTML spec. The first step in the algorithm is "Set the media element's show poster flag to false" [1], which hides the poster frame. [1] https://html.spec.whatwg.org/#seeking:dom-media-currenttime Created attachment 429134 [details]
Screenshot of test case in simulator showing blue background
The first frame is black, and that is the expected behaviour.
Unfortunately the video disappears and the blue background is visible.
I'm not sure if this is related, but we've also noticed a visible flash between the poster and the first video frame when triggering .play() in the latest iOS Safari. It is as if the poster frame is hidden before there's a visible video frame. Created attachment 429643 [details]
Video showing element disappearing and the blue background showing through
Eric
The video element does indeed disappear. The blue background shows where the black first frame should have shown.
Please check the attachments.
Video disappears and lightblue background shows through on iOS 14.5.1 (See attachments) First frame (black) is not visible. The issue seems to be fixed in Safari 15. There is still a few frames after the poster is hidden where the background shows through, before the video itself is painted: This is reported in a separate bug: https://bugs.webkit.org/show_bug.cgi?id=226960 Sorry. I was mistaken in the previous comment. The issue still persist on Safari 15 on iOS. It does not affect Safari 15 on macOS. Will this be fixed by https://bugs.webkit.org/show_bug.cgi?id=226960 I am unable to reproduce this bug in iOS 17.0.3 using iPhone 13 Pro Max using codepen from Comment 0 and don't get just 'Blue' background. Appreciate if someone else can also confirm, so we can close it. CCing - Karl (if he can help) and Dana. Sorry for not following up on this bug. I retested on the following: - iOS 16.1 / Simulator - iOS 17.0 / Simulator - iOS 17.0.3 / iPhone 15 The video disappear on all of the devices when you set currentTime to 0. Created attachment 468199 [details]
Screenshot of the bug on iOS 17.0.3 / iPhone 15
Attaching a screenshot of the bug on iOS 17.0.3
After a few seconds, the video poster disappears, but no video frame is drawn, so the lightblue background show through.
This bug seems related to https://bugs.webkit.org/show_bug.cgi?id=226960. That bug is closed as fixed, but it is still reproducible on iOS 17. |