<?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>37390</bug_id>
          
          <creation_ts>2010-04-10 12:07:46 -0700</creation_ts>
          <short_desc>[GStreamer] Apple trailers not playing</short_desc>
          <delta_ts>2010-05-26 00:19:11 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Bastien Nocera">bugzilla</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>chpe</cc>
    
    <cc>pnormand</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>211169</commentid>
    <comment_count>0</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2010-04-10 12:07:46 -0700</bug_when>
    <thetext>1. Go to any Apple trailers page like:
http://trailers.apple.com/trailers/paramount/dinnerforschmucks/
2. Click on &quot;Watch now&quot;
3. Gray area pops up, and no movie

Do the same thing in Firefox, with Totem&apos;s QuickTime-compatible NarrowSpace plugin, and it will work as expected.

The builtin video support should only kick in when:
- Playing in &quot;full-screen&quot; (when mode is NP_FULL)
or
- When a plug-in handling the mime-type is already available
or (obviously)
- When a video or audio tag is used</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223373</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2010-05-10 10:07:45 -0700</bug_when>
    <thetext>It seems r56650 introduced this &quot;bug&quot;. It enables proxying to a MediaElement. It actually works but the User-Agent is not set &quot;apple-friendly&quot; by the FrameLoader in this case and that&apos;s why you see nothing. Apple webserver sents a 302 response because of that ... user-agent filter they have.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223914</commentid>
    <comment_count>2</comment_count>
      <attachid>55701</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2010-05-11 07:18:26 -0700</bug_when>
    <thetext>Created attachment 55701
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224205</commentid>
    <comment_count>3</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2010-05-11 15:49:32 -0700</bug_when>
    <thetext>I don&apos;t agree with that patch one bit. The patch still doesn&apos;t allow for the controls to be used in the display, because the web page expects a plugin compatible with QuickTime, not builtin HTML5 video support.

If I wanted that sort of patches to get into WebKit, I would have mentioned what the work-around was.

I want WebKitGTK to stop taking over &lt;embed&gt; and &lt;object&gt; mime-types that are handled by plugins.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224655</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2010-05-12 08:50:36 -0700</bug_when>
    <thetext>See http://trailers.apple.com/trailers/global/scripts/lib/ac_media.js

// added a check for Google Chrome; until they fix their .mov wrapper bug we can&apos;t serve the &lt;video&gt; element
135            if (shouldBuildMediaSpecVideo &amp;&amp; Media._isHTML5VideoAvailable() &amp;&amp;
136                !Media.Detection.Firefox() &amp;&amp; !Media.Detection.Mobile() &amp;&amp;
137                !Media.Detection.Chrome()) {
138                // Create &lt;video&gt; player
139                return build(Media.Spec.Video);
140            }
141            
142            if (shouldBuildMediaSpecQuickTime &amp;&amp;
143                Media._isQuickTimeAvailable(Media.MIN_QUICKTIME_VERSION) ||
144                Media.Detection.Mobile()) {
145                // Create QuickTime player
146                return build(Media.Spec.QuickTime);
147            }

So the logic is to check if the browser supports HTML5 video and video/mp4. If so a video element is created instead of an &lt;object&gt;... So, not sure what I can actually do. I won&apos;t blacklist video/mp4 from our player. Have you tried the patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225331</commentid>
    <comment_count>5</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2010-05-13 08:56:43 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; See http://trailers.apple.com/trailers/global/scripts/lib/ac_media.js
&gt; 
&gt; // added a check for Google Chrome; until they fix their .mov wrapper bug we can&apos;t serve the &lt;video&gt; element
&lt;snip&gt;
&gt; So the logic is to check if the browser supports HTML5 video and video/mp4. If so a video element is created instead of an &lt;object&gt;... So, not sure what I can actually do. I won&apos;t blacklist video/mp4 from our player. Have you tried the patch?

Right, it&apos;s my mistake for thinking that WebKitGTK was taking over from the &lt;embed&gt; property. Are you sure that&apos;s what it&apos;s doing?

I still don&apos;t understand why a User-agent matching *QuickTime* (as opposed to one matching the Safari version) would make a difference to the website, if you were using a &lt;video&gt; tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225336</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2010-05-13 09:15:26 -0700</bug_when>
    <thetext>(In reply to comment #5)

&gt; Right, it&apos;s my mistake for thinking that WebKitGTK was taking over from the &lt;embed&gt; property. Are you sure that&apos;s what it&apos;s doing?
&gt; 

Well yeah that&apos;s what I conclude. I could see in gdb that the video element is created from Javascript. I also tested with Chromium, no &lt;video&gt; element is created, likely because of the checks in that js script.

I could be wrong but I didn&apos;t see any place in WebKit code where we replace an &lt;object&gt; with a &lt;video&gt; element.

&gt; I still don&apos;t understand why a User-agent matching *QuickTime* (as opposed to one matching the Safari version) would make a difference to the website, if you were using a &lt;video&gt; tag.

That confused me too. I think we never correctly sent the &quot;Quicktime&quot; UA. I don&apos;t see how it could work in the current call order, there was no change in the frameloader changing the behavior.

You currently only see a gray rectangle because our player get a 302 error from apple webserver, because we don&apos;t send the correct user-agent (I checked with wireshark).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225350</commentid>
    <comment_count>7</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2010-05-13 09:50:34 -0700</bug_when>
    <thetext>Right. So the last problem is whether you want to hard-code a user-agent for a website into the webkit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230573</commentid>
    <comment_count>8</comment_count>
      <attachid>55701</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2010-05-25 21:21:13 -0700</bug_when>
    <thetext>Comment on attachment 55701
proposed patch

Can I suggest renaming this bug report before committing, and making sure the changed name is reflected in the ChangeLog, since your investigation concluded it has nothing to do with WebKitGTK+ taking over from plugins? =)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>230602</commentid>
    <comment_count>9</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2010-05-26 00:19:11 -0700</bug_when>
    <thetext>Thanks for the review Gustavo.
Landed the patch in http://trac.webkit.org/changeset/60219</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55701</attachid>
            <date>2010-05-11 07:18:26 -0700</date>
            <delta_ts>2010-05-25 21:21:12 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>proposed-patch.patch</filename>
            <type>text/plain</type>
            <size>2455</size>
            <attacher name="Philippe Normand">pnormand</attacher>
            
              <data encoding="base64">RnJvbSA0MWQ0OTI4ODE2YzA2MGE0MWIxZmM2OTY4NGViNGJiNDEwYWVmZTI3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwZSBOb3JtYW5kIDxwbm9ybWFuZEBpZ2FsaWEuY29t
PgpEYXRlOiBUdWUsIDExIE1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XNjaWlfc3RyY2FzZWNtcCgibW92aWVzLmFwcGxlLmNvbSIsIHVybC5ob3N0KCkudXRmOCgp
LmRhdGEoKSkpCi0gICAgICAgIHJlcXVlc3Quc2V0SFRUUFVzZXJBZ2VudCgiUXVpY2t0aW1lLzcu
Mi4wIik7Ci0KICAgICBpZiAocHJpdi0+ZnJhbWUpIHsKICAgICAgICAgRG9jdW1lbnQqIGRvY3Vt
ZW50ID0gcHJpdi0+ZnJhbWUtPmRvY3VtZW50KCk7CiAgICAgICAgIGlmIChkb2N1bWVudCkKQEAg
LTQwMiw2ICszOTgsMTIgQEAgc3RhdGljIGJvb2wgd2ViS2l0V2ViU3JjU3RhcnQoV2ViS2l0V2Vi
U3JjKiBzcmMpCiAgICAgICAgICAgICBsb2FkZXItPmFkZEV4dHJhRmllbGRzVG9TdWJyZXNvdXJj
ZVJlcXVlc3QocmVxdWVzdCk7CiAgICAgfQogCisgICAgLy8gTGV0IEFwcGxlIHdlYiBzZXJ2ZXJz
IGtub3cgd2Ugd2FudCB0byBhY2Nlc3MgdGhlaXIgbmljZSBtb3ZpZSB0cmFpbGVycy4KKyAgICBp
ZiAoIWdfYXNjaWlfc3RyY2FzZWNtcCgibW92aWVzLmFwcGxlLmNvbSIsIHVybC5ob3N0KCkudXRm
OCgpLmRhdGEoKSkKKyAgICAgICAgfHwgIWdfYXNjaWlfc3RyY2FzZWNtcCgidHJhaWxlcnMuYXBw
bGUuY29tIiwgdXJsLmhvc3QoKS51dGY4KCkuZGF0YSgpKSkgeworICAgICAgICByZXF1ZXN0LnNl
dEhUVFBVc2VyQWdlbnQoIlF1aWNrdGltZS83LjIuMCIpOworICAgIH0KKwogICAgIGlmIChwcml2
LT5yZXF1ZXN0ZWRPZmZzZXQpIHsKICAgICAgICAgR093blB0cjxnY2hhcj4gdmFsOwogCi0tIAox
LjcuMQ==
</data>
<flag name="review"
          id="39958"
          type_id="1"
          status="+"
          setter="gustavo"
    />
          </attachment>
      

    </bug>

</bugzilla>