Bug 218391

Summary: Transparent video poster image doesn't keep element transparent once first frame is preloaded
Product: WebKit Reporter: hello
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, pdr, philipj, sergio, smoley, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac   
OS: macOS 10.15   
See Also: https://bugs.webkit.org/show_bug.cgi?id=218723
Attachments:
Description Flags
Patch none

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].