<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239961</bug_id>
          
          <creation_ts>2022-05-02 05:15:14 -0700</creation_ts>
          <short_desc>&lt;video&gt; poster attribute allows another video</short_desc>
          <delta_ts>2022-05-04 08:59:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff Johnson">opendarwin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jean-yves.avenard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1865802</commentid>
    <comment_count>0</comment_count>
      <attachid>458674</attachid>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2022-05-02 05:15:14 -0700</bug_when>
    <thetext>Created attachment 458674
Sample HTML reproduction

The &lt;video&gt; poster attribute is supposed to be an image, but Safari allows and plays a video as the poster attribute. It&apos;s videos all the way down! And the poster video is auto-played (silently) even when Never Auto-Play is set in Safari&apos;s Auto-Play Preferences.

This bug only occurs in Safari. Chrome and Firefox do not show or play a poster video.

I&apos;m testing with Safari Version 15.4 (17613.1.17.1.13) on macOS Version 12.3.1, M1 MacBook Pro.

Attached is a sample HTML file reproducing the issue.

I discovered this bug from an advertisement on cnn.com that wasn&apos;t respecting Safari&apos;s Auto-Play preferences, but I can&apos;t find the specific ad anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866341</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-03 18:27:58 -0700</bug_when>
    <thetext>&lt;rdar://problem/92705356&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866436</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-05-04 07:16:56 -0700</bug_when>
    <thetext>There&apos;s two things here, I think:

1. Should a video be allowed a poster as a poster? (Which Dean mentioned on https://github.com/WebKit/explainers/issues/79!)

2. The poster video not obeying the site auto-play preference.

IMO, the latter is the more significant (and serious) issue, not least because it has the potential to actually cost the user real money.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866458</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2022-05-04 08:23:47 -0700</bug_when>
    <thetext>(In reply to Sam Sneddon [:gsnedders] from comment #2)
&gt; There&apos;s two things here, I think:
&gt; 
&gt; 1. Should a video be allowed a poster as a poster? (Which Dean mentioned on
&gt; https://github.com/WebKit/explainers/issues/79!)
&gt; 

Safari, Firefox, and Chrome all allow animated .gif files as a &lt;video&gt; poster. From the user&apos;s perspective, what&apos;s the difference?

Only Safari allows a video file as a poster, but only WebKit allows a video file to be used as the source for an &lt;img&gt; element.


&gt; 2. The poster video not obeying the site auto-play preference.
&gt; 

Should an animated &lt;img&gt; also respect the user&apos;s auto-play preference?


&gt; IMO, the latter is the more significant (and serious) issue, not least
&gt; because it has the potential to actually cost the user real money.

A video file is generally smaller and more efficient to decompress, and therefore less expensive to download and display, than the same image sequence saved as an animated image.

I&apos;m not necessarily saying that an animated poster makes sense, just that we shouldn&apos;t differentiate between using a video file and an animated image.

Should this be a spec issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866481</commentid>
    <comment_count>4</comment_count>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2022-05-04 08:59:21 -0700</bug_when>
    <thetext>(In reply to Eric Carlson from comment #3)
&gt; (In reply to Sam Sneddon [:gsnedders] from comment #2)
&gt; &gt; There&apos;s two things here, I think:
&gt; &gt; 
&gt; &gt; 1. Should a video be allowed a poster as a poster? (Which Dean mentioned on
&gt; &gt; https://github.com/WebKit/explainers/issues/79!)
&gt; &gt; 
&gt; 
&gt; Safari, Firefox, and Chrome all allow animated .gif files as a &lt;video&gt;
&gt; poster. From the user&apos;s perspective, what&apos;s the difference?

None. I wasn&apos;t aware that a poster frame would animate, but I&apos;ve just confirmed this in testing.


&gt; Only Safari allows a video file as a poster, but only WebKit allows a video
&gt; file to be used as the source for an &lt;img&gt; element.

I definitely wasn&apos;t aware of this.


&gt; &gt; 2. The poster video not obeying the site auto-play preference.
&gt; &gt; 
&gt; 
&gt; Should an animated &lt;img&gt; also respect the user&apos;s auto-play preference?

Yes, absolutely. So many users are already annoyed by auto-playing animated gifs, it&apos;s astonishing that browser vendors haven&apos;t done anything to stop this. The fact that video files can be smaller in size and more efficient than gifs will just encourage web developers to abuse the capability.

Seriously, if Safari shipped click-to-play animated gifs, you might get more public praise than you&apos;ve ever heard in your life.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>458674</attachid>
            <date>2022-05-02 05:15:14 -0700</date>
            <delta_ts>2022-05-02 05:15:14 -0700</delta_ts>
            <desc>Sample HTML reproduction</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>292</size>
            <attacher name="Jeff Johnson">opendarwin</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1lcXVpdj0iY29udGVudC10
eXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPgo8dGl0bGU+UG9zdGVyIGJ1
ZzwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+Cjx2aWRlbwpjb250cm9scyB3aWR0aD0iNjIwIgpzcmM9
Imh0dHBzOi8vd3d3Lnczc2Nob29scy5jb20vaHRtbC9tb3ZfYmJiLm1wNCIKcG9zdGVyPSJodHRw
czovL3d3dy53M3NjaG9vbHMuY29tL3RhZ3MvbW92aWUubXA0Igo+PC92aWRlbz4KPC9ib2R5Pgo8
L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>