<?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>245612</bug_id>
          
          <creation_ts>2022-09-23 18:12:33 -0700</creation_ts>
          <short_desc>[Quirks] Site-specific hacks break native video controls on YouTube</short_desc>
          <delta_ts>2023-10-30 09:33:23 -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 16</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 16</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, 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>bfulgham</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1900810</commentid>
    <comment_count>0</comment_count>
      <attachid>462575</attachid>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2022-09-23 18:12:33 -0700</bug_when>
    <thetext>Created attachment 462575
Sample html demonstrating the bug

This bug occurs in Safari on iOS/iPadOS 16 and 15.

Steps to reproduce:
1) Open the attachment index.html in Mobile Safari
2) Press the YouTube play button to start the video
3) Press the native pause button to pause the video
4) Press the native play button to play the video again

Expected results:
The native video controls remain on the screen for a few seconds, and after they disappear, you can bring them back by touching the video.

Actual results:
The native video controls disappear immediately after pressing play, and when you touch the video, the native controls appear momentarily and disappear immediately. It&apos;s extremely difficult to get the native controls to stay on the screen.

If you open the Safari web inspector, disable Site-specific Hacks, and reload the page, then everything works as expected again.

I&apos;m still trying to determine exactly which quirk is causing this, but there are a couple that look relevant:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/Quirks.cpp

This bug is relevant to me because I have an iOS Safari extension that shows the native video controls on sites, and the Safari quirk breaks the feature for YouTube embeds. If you know of a workaround I could use that doesn&apos;t involve disabling Site-specific Hacks, I would appreciate it.

Related: For some reason, another Safari quirk is to make YouTube videos show iOS 15 style video controls on iOS 16 unless the URL has the search parameter showinfo=0. This seems strange.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900938</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-24 16:13:40 -0700</bug_when>
    <thetext>&lt;rdar://problem/100367762&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1905705</commentid>
    <comment_count>2</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2022-10-14 14:08:52 -0700</bug_when>
    <thetext>Likely caused by https://commits.webkit.org/213411@main, a quirk/workaround for behavior introduced in https://trac.webkit.org/changeset/242798/webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907965</commentid>
    <comment_count>3</comment_count>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2022-10-24 20:49:34 -0700</bug_when>
    <thetext>On further testing, I don&apos;t think the issue is restricted to iframes. That&apos;s just a coincidence, because the iframe has a src with the www.youtube.com domain, which is the same as in the site-specific hack. I can also reproduce the issue with the main frame of a page if I use Request Desktop Website in Mobile Safari (which is the default on iPad). Whereas if I use Request Mobile Website, the issue tends not to occur with the main frame, because the domain will be m.youtube.com, which isn&apos;t covered by the site-specific hack.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988523</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-10-30 09:33:23 -0700</bug_when>
    <thetext>&gt; I can also reproduce the issue with the main frame of a page if I use Request Desktop Website in Mobile Safari (which is the default on iPad).

Default on iPads which are sending the desktop User agent (such as the iPad Pro). 
iPad mini is sending a different UA (iPadOS) and receives a mobile layout.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>462575</attachid>
            <date>2022-09-23 18:12:33 -0700</date>
            <delta_ts>2022-09-23 18:12:33 -0700</delta_ts>
            <desc>Sample html demonstrating the bug</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>352</size>
            <attacher name="Jeff Johnson">opendarwin</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGNoYXJzZXQ9InV0
Zi04Ij4KPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MS4wIj4K
PHRpdGxlPllvdVR1YmUgZW1iZWQgdGVzdDwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+CjxoMT5Zb3VU
dWJlIGVtYmVkIHRlc3Q8L2gxPgoKPGlmcmFtZSB3aWR0aD0iNTYwIiBoZWlnaHQ9IjMxNSIKc3Jj
PSJodHRwczovL3d3dy55b3V0dWJlLmNvbS9lbWJlZC9DV1RtMGNjZlplND91c2VfbmF0aXZlX2Nv
bnRyb2xzPTEiCnRpdGxlPSJZb3VUdWJlIHZpZGVvIHBsYXllciI+CjwvaWZyYW1lPgoKPC9ib2R5
Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>