Skip to content
Permalink
Browse files

[giow] (0) Revamp how .muted, .volume, and muted='' are defined (shou…

…ldn't impact implementations)

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13327

git-svn-id: http://svn.whatwg.org/webapps@6467 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Aug 16, 2011
1 parent e2533c3 commit e15f978bfbe01624da3155f61ee0efadf256ef7c
Showing with 98 additions and 75 deletions.
  1. +32 −25 complete.html
  2. +32 −25 index
  3. +34 −25 source
<p>The <dfn id=dom-media-volume title=dom-media-volume><code>volume</code></dfn>
attribute must return the playback volume of any audio portions of
the <a href=#media-element>media element</a>, in the range 0.0 (silent) to 1.0
(loudest). Initially, the volume must be 1.0, but user agents may
(loudest). Initially, the volume should be 1.0, but user agents may
remember the last set value across sessions, on a per-site basis or
otherwise, so the volume may start at other values. On setting, if
the new value is in the range 0.0 to 1.0 inclusive, the attribute
must be set to the new value. If the new value is outside the range
0.0 to 1.0 inclusive, then, on setting, an
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception must be raised instead.</p>
the new value is in the range 0.0 to 1.0 inclusive, the playback
volume of any audio portions of the <a href=#media-element>media element</a> must
be set to the new value. If the new value is outside the range 0.0
to 1.0 inclusive, then, on setting, an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
exception must be raised instead.</p>

<p>The <dfn id=dom-media-muted title=dom-media-muted><code>muted</code></dfn>
attribute must return true if the audio channels are muted and false
otherwise. Initially, the audio channels should not be muted
(false), but user agents may remember the last set value across
sessions, on a per-site basis or otherwise, so the muted state may
start as muted (true). On setting, the attribute must be set to the
new value.</p>

<p>Whenever either the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> or
<code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attributes are changed,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code> at the <a href=#media-element>media
element</a>.</p>
attribute must return true if the audio output is muted and false
otherwise. Initially, the audio output should not be muted (false),
but user agents may remember the last set value across sessions, on
a per-site basis or otherwise, so the muted state may start as muted
(true). On setting, if the new value is true then the audio output
should be muted and if the new value is false it should be
unmuted.</p>

<p>Whenever either of the values that would be returned by the <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> and <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> attributes change, the user
agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code> at the
<a href=#media-element>media element</a>.</p>

<p>An element's <dfn id=effective-media-volume>effective media volume</dfn> is determined as
follows:</p>

<ol><li><p>If the element's <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code>
attribute is true, the element's <a href=#effective-media-volume>effective media
volume</a> is zero. Abort these steps.</li>
<ol><li><p>If the user has indicated that the user agent is to override
the volume of the element, then the element's <a href=#effective-media-volume>effective media
volume</a> is the volume desired by the user. Abort these
steps.</li>

<li><p>If the element's audio output is muted, the element's
<a href=#effective-media-volume>effective media volume</a> is zero. Abort these
steps.</li>

<li><p>If the element has a <a href=#current-media-controller>current media controller</a>
and that <code><a href=#mediacontroller>MediaController</a></code> object's <a href=#media-controller-mute-override>media
controller mute override</a> is true, the element's
<a href=#effective-media-volume>effective media volume</a> is zero. Abort these
steps.</li>

<li><p>Let <var title="">volume</var> be the value of the element's
<code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attribute.</li>
<li><p>Let <var title="">volume</var> be the playback volume of the
audio portions of the <a href=#media-element>media element</a>, in range 0.0
(silent) to 1.0 (loudest).</li>

<li><p>If the element has a <a href=#current-media-controller>current media controller</a>,
multiply <var title="">volume</var> by that
<p>The <dfn id=attr-media-muted title=attr-media-muted><code>muted</code></dfn>
attribute on <a href=#media-element title="media element">media elements</a> is a
<a href=#boolean-attribute>boolean attribute</a> that controls the default state of
the audio channel of the <a href=#media-resource>media resource</a>, potentially
the audio output of the <a href=#media-resource>media resource</a>, potentially
overriding user preferences.</p>

<div class=impl>

<p>When a <a href=#media-element>media element</a> is created, if it has a <code title=attr-media-muted><a href=#attr-media-muted>muted</a></code> attribute specified, the user
agent must set the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> IDL
attribute to true, overriding any user preference.</p>
agent must mute the <a href=#media-element>media element</a>'s audio output,
overriding any user preference.</p>

<p>The <dfn id=dom-media-defaultmuted title=dom-media-defaultMuted><code>defaultMuted</code></dfn> IDL
attribute must <a href=#reflect>reflect</a> the <code title=attr-media-muted><a href=#attr-media-muted>muted</a></code> content attribute.</p>
57 index
<p>The <dfn id=dom-media-volume title=dom-media-volume><code>volume</code></dfn>
attribute must return the playback volume of any audio portions of
the <a href=#media-element>media element</a>, in the range 0.0 (silent) to 1.0
(loudest). Initially, the volume must be 1.0, but user agents may
(loudest). Initially, the volume should be 1.0, but user agents may
remember the last set value across sessions, on a per-site basis or
otherwise, so the volume may start at other values. On setting, if
the new value is in the range 0.0 to 1.0 inclusive, the attribute
must be set to the new value. If the new value is outside the range
0.0 to 1.0 inclusive, then, on setting, an
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception must be raised instead.</p>
the new value is in the range 0.0 to 1.0 inclusive, the playback
volume of any audio portions of the <a href=#media-element>media element</a> must
be set to the new value. If the new value is outside the range 0.0
to 1.0 inclusive, then, on setting, an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
exception must be raised instead.</p>

<p>The <dfn id=dom-media-muted title=dom-media-muted><code>muted</code></dfn>
attribute must return true if the audio channels are muted and false
otherwise. Initially, the audio channels should not be muted
(false), but user agents may remember the last set value across
sessions, on a per-site basis or otherwise, so the muted state may
start as muted (true). On setting, the attribute must be set to the
new value.</p>

<p>Whenever either the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> or
<code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attributes are changed,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code> at the <a href=#media-element>media
element</a>.</p>
attribute must return true if the audio output is muted and false
otherwise. Initially, the audio output should not be muted (false),
but user agents may remember the last set value across sessions, on
a per-site basis or otherwise, so the muted state may start as muted
(true). On setting, if the new value is true then the audio output
should be muted and if the new value is false it should be
unmuted.</p>

<p>Whenever either of the values that would be returned by the <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> and <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> attributes change, the user
agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code> at the
<a href=#media-element>media element</a>.</p>

<p>An element's <dfn id=effective-media-volume>effective media volume</dfn> is determined as
follows:</p>

<ol><li><p>If the element's <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code>
attribute is true, the element's <a href=#effective-media-volume>effective media
volume</a> is zero. Abort these steps.</li>
<ol><li><p>If the user has indicated that the user agent is to override
the volume of the element, then the element's <a href=#effective-media-volume>effective media
volume</a> is the volume desired by the user. Abort these
steps.</li>

<li><p>If the element's audio output is muted, the element's
<a href=#effective-media-volume>effective media volume</a> is zero. Abort these
steps.</li>

<li><p>If the element has a <a href=#current-media-controller>current media controller</a>
and that <code><a href=#mediacontroller>MediaController</a></code> object's <a href=#media-controller-mute-override>media
controller mute override</a> is true, the element's
<a href=#effective-media-volume>effective media volume</a> is zero. Abort these
steps.</li>

<li><p>Let <var title="">volume</var> be the value of the element's
<code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attribute.</li>
<li><p>Let <var title="">volume</var> be the playback volume of the
audio portions of the <a href=#media-element>media element</a>, in range 0.0
(silent) to 1.0 (loudest).</li>

<li><p>If the element has a <a href=#current-media-controller>current media controller</a>,
multiply <var title="">volume</var> by that
<p>The <dfn id=attr-media-muted title=attr-media-muted><code>muted</code></dfn>
attribute on <a href=#media-element title="media element">media elements</a> is a
<a href=#boolean-attribute>boolean attribute</a> that controls the default state of
the audio channel of the <a href=#media-resource>media resource</a>, potentially
the audio output of the <a href=#media-resource>media resource</a>, potentially
overriding user preferences.</p>

<div class=impl>

<p>When a <a href=#media-element>media element</a> is created, if it has a <code title=attr-media-muted><a href=#attr-media-muted>muted</a></code> attribute specified, the user
agent must set the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> IDL
attribute to true, overriding any user preference.</p>
agent must mute the <a href=#media-element>media element</a>'s audio output,
overriding any user preference.</p>

<p>The <dfn id=dom-media-defaultmuted title=dom-media-defaultMuted><code>defaultMuted</code></dfn> IDL
attribute must <a href=#reflect>reflect</a> the <code title=attr-media-muted><a href=#attr-media-muted>muted</a></code> content attribute.</p>
59 source
<p>The <dfn title="dom-media-volume"><code>volume</code></dfn>
attribute must return the playback volume of any audio portions of
the <span>media element</span>, in the range 0.0 (silent) to 1.0
(loudest). Initially, the volume must be 1.0, but user agents may
(loudest). Initially, the volume should be 1.0, but user agents may
remember the last set value across sessions, on a per-site basis or
otherwise, so the volume may start at other values. On setting, if
the new value is in the range 0.0 to 1.0 inclusive, the attribute
must be set to the new value. If the new value is outside the range
0.0 to 1.0 inclusive, then, on setting, an
<code>INDEX_SIZE_ERR</code> exception must be raised instead.</p>
the new value is in the range 0.0 to 1.0 inclusive, the playback
volume of any audio portions of the <span>media element</span> must
be set to the new value. If the new value is outside the range 0.0
to 1.0 inclusive, then, on setting, an <code>INDEX_SIZE_ERR</code>
exception must be raised instead.</p>

<p>The <dfn title="dom-media-muted"><code>muted</code></dfn>
attribute must return true if the audio channels are muted and false
otherwise. Initially, the audio channels should not be muted
(false), but user agents may remember the last set value across
sessions, on a per-site basis or otherwise, so the muted state may
start as muted (true). On setting, the attribute must be set to the
new value.</p>

<p>Whenever either the <code title="dom-media-muted">muted</code> or
<code title="dom-media-volume">volume</code> attributes are changed,
the user agent must <span>queue a task</span> to <span>fire a simple
attribute must return true if the audio output is muted and false
otherwise. Initially, the audio output should not be muted (false),
but user agents may remember the last set value across sessions, on
a per-site basis or otherwise, so the muted state may start as muted
(true). On setting, if the new value is true then the audio output
should be muted and if the new value is false it should be
unmuted.</p>

<p>Whenever either of the values that would be returned by the <code
title="dom-media-volume">volume</code> and <code
title="dom-media-muted">muted</code> attributes change, the user
agent must <span>queue a task</span> to <span>fire a simple
event</span> named <code
title="event-media-volumechange">volumechange</code> at the <span>media
element</span>.</p>
title="event-media-volumechange">volumechange</code> at the
<span>media element</span>.</p>

<p>An element's <dfn>effective media volume</dfn> is determined as
follows:</p>

<ol>

<li><p>If the element's <code title="dom-media-muted">muted</code>
attribute is true, the element's <span>effective media
volume</span> is zero. Abort these steps.</p></li>
<li><p>If the user has indicated that the user agent is to override
the volume of the element, then the element's <span>effective media
volume</span> is the volume desired by the user. Abort these
steps.</p></li>

<li><p>If the element's audio output is muted, the element's
<span>effective media volume</span> is zero. Abort these
steps.</p></li>

<li><p>If the element has a <span>current media controller</span>
and that <code>MediaController</code> object's <span>media
controller mute override</span> is true, the element's
<span>effective media volume</span> is zero. Abort these
steps.</p></li>

<li><p>Let <var title="">volume</var> be the value of the element's
<code title="dom-media-volume">volume</code> attribute.</p></li>
<li><p>Let <var title="">volume</var> be the playback volume of the
audio portions of the <span>media element</span>, in range 0.0
(silent) to 1.0 (loudest).</p></li>

<li><p>If the element has a <span>current media controller</span>,
multiply <var title="">volume</var> by that
<p>The <dfn title="attr-media-muted"><code>muted</code></dfn>
attribute on <span title="media element">media elements</span> is a
<span>boolean attribute</span> that controls the default state of
the audio channel of the <span>media resource</span>, potentially
the audio output of the <span>media resource</span>, potentially
overriding user preferences.</p>

<div class="impl">

<p>When a <span>media element</span> is created, if it has a <code
title="attr-media-muted">muted</code> attribute specified, the user
agent must set the <code title="dom-media-muted">muted</code> IDL
attribute to true, overriding any user preference.</p>
agent must mute the <span>media element</span>'s audio output,
overriding any user preference.</p>

<p>The <dfn
title="dom-media-defaultMuted"><code>defaultMuted</code></dfn> IDL

0 comments on commit e15f978

Please sign in to comment.
You can’t perform that action at this time.