Bug 218391 - Transparent video poster image doesn't keep element transparent once first frame is preloaded
Summary: Transparent video poster image doesn't keep element transparent once first fr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-30 09:51 PDT by hello
Modified: 2020-11-09 13:55 PST (History)
15 users (show)

See Also:


Attachments
Patch (30.44 KB, patch)
2020-11-04 12:51 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hello 2020-10-30 09:51:21 PDT
In Safari 14, setting a transparent poster image on a video with `preoload="auto"` no longer keeps the video element transparent once the first frame gets loaded, as it did in the previous versions of Safari. The element remains transparent if `preload` is `none` or `metadata`, though.

To reproduce:

Open the following page in Safari

```
<html>
  <title>Test video player</title>
  <body>
  <h1>Test video player</h1>
  <video controls
    src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
    poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7399w"
    preload="auto"
    width="640">
  </video>
  </body>
</html>
```

Actual result:

Once the video preloads enough data, the element's background turns black

Expected result:

The element remains transparent.

Build & Hardware:

Version 14.0 (15610.1.28.1.9, 15610) on Mac OS 10.15.6

Additional builds & Platforms:

Doesn't happen on Version 13.1.12 (15609.3.5.1.3) on Mac OS 10.15.6
Comment 1 Smoley 2020-10-31 09:56:43 PDT
Thanks for filing, this does not reproduce for me on 13.1.3 or the Safari 14.0.1 beta, but I am reproducing it on TOT.
Comment 2 Radar WebKit Bug Importer 2020-10-31 09:56:53 PDT
<rdar://problem/70916944>
Comment 3 Eric Carlson 2020-11-04 12:51:57 PST
Created attachment 413196 [details]
Patch
Comment 4 EWS 2020-11-04 17:05:19 PST
Committed r269407: <https://trac.webkit.org/changeset/269407>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413196 [details].