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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25153</bug_id>
          
          <creation_ts>2014-03-26 10:02:58 +0000</creation_ts>
          <short_desc>&quot;When a media element is created, if it has a muted attribute specified, the user agent must mute the media element&apos;s audio output, overriding any user preference.&quot; - what is intended to happen for &lt;v [...]</short_desc>
          <delta_ts>2014-05-05 22:30:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>25460</dup_id>
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#user-interface</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102908</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-26 10:02:58 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#user-interface
Complete: http://www.whatwg.org/c#user-interface
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
&quot;When a media element is created, if it has a muted attribute specified, the
user agent must mute the media element&apos;s audio output, overriding any user
preference.&quot; - what is intended to happen for &lt;video muted&gt;.cloneNode()? (The
DOM spec says to first create the element and then copy the attributes.)
(Context: https://critic.hoppipolla.co.uk/showcomment?chain=3191 )

Posted from: 90.230.218.37 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36 OPR/20.0.1387.59 (Edition Next)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102913</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-26 10:56:56 +0000</bug_when>
    <thetext>What exactly is the problem? That whole clone operation is atomic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102914</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-26 11:13:57 +0000</bug_when>
    <thetext>It doesn&apos;t look atomic, it has steps like any other algorithm and the only way I can interpret &quot;Let copy be a node that implements the same interfaces as node.&quot; is that this is the point where &quot;When a media element is created&quot; would be triggered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102915</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-03-26 11:19:30 +0000</bug_when>
    <thetext>Ah, in a web component world the &quot;created&quot; check would happen later in a callback. That might work well for this too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102918</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-26 11:39:25 +0000</bug_when>
    <thetext>I don&apos;t think it&apos;s very important how muted works with cloneNode since it&apos;s a declarative feature anyway. In Blink my interpretation was the one that came naturally, so I&apos;d be happy if that&apos;s what the specs end up saying, but anything is fine really.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103185</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-31 17:12:57 +0000</bug_when>
    <thetext>Why does it matter if the attributes are copied after the element is created? Are you concerned about the &apos;volumechange&apos; event being fired?

Anne, why aren&apos;t we just create the clone with the attributes instead of as two separate steps?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103189</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-31 18:22:37 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #5)
&gt; Why does it matter if the attributes are copied after the element is
&gt; created? Are you concerned about the &apos;volumechange&apos; event being fired?

I don&apos;t think it matters much how this works, as long as the spec is clear.

Alternatively, the muted (and mediagroup) attribute handling could be changed to just trigger when setting the content attribute regardless of cause. I doesn&apos;t seem to matter much to me, and it turns out that the special case for the parser caused a 1-2% performance regression when I tried implementing it:
https://codereview.chromium.org/205683003/

(Possibly I just suck at programming, it&apos;s hard to say.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103209</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-03-31 22:20:46 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #5)
&gt; Why does it matter if the attributes are copied after the element is
&gt; created?

It matters here in that it affects whether the cloned element is muted or not (which is exposed to JS using .muted IDL attribute). If it&apos;s created without attributes, it&apos;s not muted. Adding the muted attribute afterwards does nothing.

&gt; Are you concerned about the &apos;volumechange&apos; event being fired?

No, that wouldn&apos;t fire either way I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103216</commentid>
    <comment_count>8</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-04-01 04:04:13 +0000</bug_when>
    <thetext>At this point I think the spec should just not use the notion of attributes existing at the time an element is created. How about just &quot;If the muted content attribute of a media element is set, the user agent must set the muted IDL attribute to true.&quot;? Same with mediagroup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104436</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-04-25 11:35:18 +0000</bug_when>
    <thetext>I filed a separate bug for my above comment:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25460</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104601</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-28 22:26:51 +0000</bug_when>
    <thetext>As far as I can tell, mediagroup is just a regular non-magical attribute as far as setting vs creation goes.

muted=&quot;&quot; is special because when it&apos;s absent on creation, the browser is supposed to be able to mute the element anyway, so as to honour user preferences, but when it&apos;s present on creation, the element must be muted; in normal cases, the attribute is supposed to do nothing but change what the default is considered to be, for the purposes of the API and UIs based on the API (actually muting and unmuting is done via .muted, which doesn&apos;t affect the content attribute or the default, and can be done by the user via the UI).

I don&apos;t really understand how you want muted=&quot;&quot;/.defaultMuted/.muted to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104679</commentid>
    <comment_count>11</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-04-29 13:22:09 +0000</bug_when>
    <thetext>&quot;When a media element is created with a mediagroup attribute&quot; is what makes mediagroup special-cased in the parser in the same way as muted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104723</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-29 21:33:47 +0000</bug_when>
    <thetext>The rest of that sentence is &quot;and when a media element&apos;s mediagroup attribute is set, changed, or removed&quot;, which is what makes it _not_ special cased. If it _only_ said &quot;when a media element&apos;s mediagroup attribute is set, changed, or removed&quot;, _then_ it&apos;s be special-cased for the parser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104734</commentid>
    <comment_count>13</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-04-29 21:52:01 +0000</bug_when>
    <thetext>Oh, right you are.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104936</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-01 21:47:38 +0000</bug_when>
    <thetext>I&apos;ve filed bug 25529 to track the DOM cloning part of this.

The rest of this looks like it&apos;s just the same as bug 25460, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104998</commentid>
    <comment_count>15</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-05-02 22:58:11 +0000</bug_when>
    <thetext>Yes, when I filed the bug I just wanted clarification on what cloneNode would do, then I went off-topic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105118</commentid>
    <comment_count>16</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-05 22:30:19 +0000</bug_when>
    <thetext>Ok, I&apos;m marking it as a dupe then.

*** This bug has been marked as a duplicate of bug 25460 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>