Skip to content
Permalink
Browse files

Integrate allowusermedia

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 May 6, 2016
1 parent 2cfb8e3 commit 688df431630fe7d9a0518e402c1f1543d0f493a0
Showing with 52 additions and 12 deletions.
  1. +52 −12 source
64 source

<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>

<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>
[<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>;
<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

</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 -->

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>

</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>

</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>

<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>
<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>


<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>
<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>;

0 comments on commit 688df43

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