Skip to content

Commit

Permalink
Integrate allowusermedia
Browse files Browse the repository at this point in the history
This is part of the effort described at
w3c/mediacapture-main#353. The spec text
largely parallels that for allowfullscreen.
  • Loading branch information
domenic committed Jun 24, 2016
1 parent 2cfb8e3 commit 688df43
Showing 1 changed file with 52 additions and 12 deletions.
64 changes: 52 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3300,11 +3300,13 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<dd>

<p>The following term is defined in the Media Capture and Streams specification: <ref spec=MEDIASTREAM></p>
<p>The following terms are defined in the Media Capture and Streams specification: <ref spec=MEDIASTREAM></p>

<ul class="brief">

<li><dfn data-noexport="" data-x-href="https://w3c.github.io/mediacapture-main/getusermedia.html#idl-def-MediaStream"><code>MediaStream</code></dfn> interface</li>
<li><dfn data-x="dom-MediaDevices-getUserMedia" data-x-href="https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia"><code>getUserMedia()</code></dfn> method</li>
<li><dfn data-x-href="https://w3c.github.io/mediacapture-main/#dfn-user-media-enabled-flag">user media enabled flag</dfn></li>

</ul>

Expand Down Expand Up @@ -27776,6 +27778,7 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
<dd><code data-x="attr-iframe-name">name</code></dd>
<dd><code data-x="attr-iframe-sandbox">sandbox</code></dd>
<dd><code data-x="attr-iframe-allowfullscreen">allowfullscreen</code></dd>
<dd><code data-x="attr-iframe-allowusermedia">allowusermedia</code></dd>
<dd><code data-x="attr-dim-width">width</code></dd>
<dd><code data-x="attr-dim-height">height</code></dd>
<dd><code data-x="attr-iframe-referrerpolicy">referrerpolicy</code></dd>
Expand All @@ -27788,6 +27791,7 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-name">name</span>;
[<span>CEReactions</span>, SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-iframe-allowFullscreen">allowFullscreen</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-iframe-allowUserMedia">allowUserMedia</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-dim-width">width</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-dim-height">height</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-referrerPolicy">referrerPolicy</span>;
Expand Down Expand Up @@ -28190,10 +28194,13 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
<code>about:blank</code> <code>Document</code> is created), and when an <code>iframe</code>
element's <code data-x="attr-iframe-sandbox">sandbox</code> attribute is set or changed while it
has a <span>nested browsing context</span>, the user agent must <span data-x="parse a sandboxing
directive">parse the sandboxing directive</span> using the attribute's value as the <var>input</var>, the <code>iframe</code> element's <span>nested browsing context</span>'s
<span><code>iframe</code> sandboxing flag set</span> as the output, and, if the
<code>iframe</code> has an <code data-x="attr-iframe-allowfullscreen">allowfullscreen</code>
attribute, the <var>allow fullscreen flag</var>.</p>
directive">parse the sandboxing directive</span> using the attribute's value as the
<var>input</var> and the <code>iframe</code> element's <span>nested browsing context</span>'s
<span><code>iframe</code> sandboxing flag set</span> as the output. If the <code>iframe</code> has
an <code data-x="attr-iframe-allowfullscreen">allowfullscreen</code> attribute, set the <var>allow
fullscreen flag</var>; if the <code>iframe</code> has an <code
data-x="attr-iframe-allowusermedia">allowusermedia</code> attribute, set the <var>allow user media
flag</var>.</p>

<p>When an <code>iframe</code> element's <code data-x="attr-iframe-sandbox">sandbox</code>
attribute is removed while it has a <span>nested browsing context</span>, the user agent must
Expand Down Expand Up @@ -28297,6 +28304,13 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {

</div>

<hr> <!-- USER MEDIA -->

<p>The <dfn><code data-x="attr-iframe-allowusermedia">allowusermedia</code></dfn> attribute is a
<span>boolean attribute</span>. When specified, it indicates that <code>Document</code> objects in
the <code>iframe</code> element's <span>browsing context</span> are to be allowed to use <code
data-x="dom-MediaDevices-getUserMedia">getUserMedia()</code> (if it's not blocked for other
reasons, e.g. there is another ancestor <code>iframe</code> without this attribute set).</p>

<hr> <!-- DIM ATTRIBUTES -->

Expand Down Expand Up @@ -28353,6 +28367,10 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
must <span>reflect</span> the <code data-x="attr-iframe-allowfullscreen">allowfullscreen</code>
content attribute.</p>

<p>The <dfn><code data-x="dom-iframe-allowUserMedia">allowUserMedia</code></dfn> IDL attribute
must <span>reflect</span> the <code data-x="attr-iframe-allowusermedia">allowusermedia</code>
content attribute.</p>

<p>The <dfn><code data-x="dom-iframe-referrerPolicy">referrerPolicy</code></dfn> IDL attribute
must <span>reflect</span> the <code data-x="attr-iframe-referrerpolicy">referrerpolicy</code>
content attribute, <span>limited to only known values</span>.</p>
Expand Down Expand Up @@ -79852,6 +79870,15 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

</dd>

<dt>The <dfn>sandboxed user media browsing context flag</dfn></dt>

<dd>

<p>This flag prevents content from using the <code
data-x="dom-MediaDevices-getUserMedia">getUserMedia()</code> method.</p>

</dd>


<dt>The <dfn>sandboxed <code data-x="dom-document-domain">document.domain</code> browsing context flag</dfn></dt>

Expand Down Expand Up @@ -79910,7 +79937,7 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
</dl>

<p>When the user agent is to <dfn>parse a sandboxing directive</dfn>, given a string <var>input</var>, a <span>sandboxing flag set</span> <var>output</var>, and
optionally an <var>allow fullscreen flag</var>, it must run the following steps:</p>
optionally an <var>allow fullscreen flag</var> and <var>allow user media flag</var>, it must run the following steps:</p>

<ol>

Expand Down Expand Up @@ -79977,7 +80004,10 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<li><p>The <span>sandboxed storage area URLs flag</span>.</p></li>

<li><p>The <span>sandboxed fullscreen browsing context flag</span>, unless the <var>allow fullscreen flag</var> was passed to the <span>parse a sandboxing
directive</span> flag.</p></li>
directive</span> algorithm.</p></li>

<li><p>The <span>sandboxed user media browsing context flag</span>, unless the <var>allow user media flag</var> was passed to the <span>parse a sandboxing
directive</span> algorithm.</p></li>

<li><p>The <span>sandboxed <code data-x="dom-document-domain">document.domain</code> browsing
context flag</span>.</p></li>
Expand Down Expand Up @@ -80067,12 +80097,16 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<span>sandboxed fullscreen browsing context flag</span> set, then abort these steps.</p></li>

<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has a
<span>browsing context container</span> and either it is not an <code>iframe</code> element, or
it does not have the <code data-x="attr-iframe-allowfullscreen">allowfullscreen</code> attribute
specified, or its <span>node document</span> does not have the <span>fullscreen enabled
flag</span> set, then also abort these steps.</p></li>
<span>browsing context container</span> that is an <code>iframe</code> element with an <code
data-x="attr-iframe-allowfullscreen">allowfullscreen</code> attribute specified, and whose
<span>node document</span> has the <span>fullscreen enabled flag</span> set, then set
<var>document</var>'s <span>fullscreen enabled flag</span>.</p></li>

<li><p>Set <var>document</var>'s <span>fullscreen enabled flag</span>.</p></li>
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has a
<span>browsing context container</span> that is an <code>iframe</code> element with an <code
data-x="attr-iframe-allowfullscreen">allowusermedia</code> attribute specified, and whose
<span>node document</span> has the <span>user media enabled flag</span> set, then set
<var>document</var>'s <span>user media enabled flag</span>.</p></li>
</ol>


Expand Down Expand Up @@ -114585,6 +114619,7 @@ interface <dfn>External</dfn> {
<code data-x="attr-iframe-name">name</code>;
<code data-x="attr-iframe-sandbox">sandbox</code>;
<code data-x="attr-iframe-allowfullscreen">allowfullscreen</code>;
<code data-x="attr-iframe-allowusermedia">allowusermedia</code>;
<code data-x="attr-dim-width">width</code>;
<code data-x="attr-dim-height">height</code>;
<code data-x="attr-iframe-referrerpolicy">referrerpolicy</code></td>
Expand Down Expand Up @@ -116098,6 +116133,11 @@ interface <dfn>External</dfn> {
<td> <code data-x="attr-iframe-allowfullscreen">iframe</code>
<td> Whether to allow the <code>iframe</code>'s contents to use <code data-x="dom-element-requestFullscreen">requestFullscreen()</code>
<td> <span>Boolean attribute</span>
<tr>
<th> <code data-x="">allowusermedia</code>
<td> <code data-x="attr-iframe-allowusermedia">iframe</code>
<td> Whether to allow the <code>iframe</code>'s contents to use <code data-x="dom-MediaDevices-getUserMedia">getUserMedia()</code>
<td> <span>Boolean attribute</span>
<tr>
<th> <code data-x="">alt</code>
<td> <code data-x="attr-area-alt">area</code>;
Expand Down

0 comments on commit 688df43

Please sign in to comment.