Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating text on whether context object is allowed to request access. #427

Merged
merged 6 commits into from Jan 19, 2017

Conversation

@stefhak
Copy link
Contributor

commented Jan 12, 2017

A first attempt on #268.

@stefhak stefhak force-pushed the stefhak:allowusermedia branch from 664a4b0 to 36c8de1 Jan 12, 2017
@alvestrand

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2017

@annevk can you say if this text looks appropriate?

@annevk

This comment has been minimized.

Copy link
Member

commented Jan 12, 2017

As I said in the referenced issue, @zcorpan is changing how this works. If we make allowusermedia static. The check here might need to be different, not sure.

But overall this looks okay, except that "this context object" should just be "context object".

@@ -3578,8 +3576,14 @@
succeed.</p>
</li>
<li>
<p>If the current [[!HTML51]] Document's <a>user media
enabled flag</a> is unset, return a promise rejected with a
<p>If this <a href="https://dom.spec.whatwg.org/#context-object">

This comment has been minimized.

Copy link
@zcorpan

zcorpan Jan 12, 2017

Member

This should say

If the current settings object's responsible document is not allowed to use the feature indicated by attribute name allowusermedia, then throw a "SecurityError" DOMException.

See https://w3c.github.io/browser-payment-api/#constructor

(In particular, MediaDevices is not a node, so "node document" is undefined.)

The allowed to use check needs to be in navigator.getUserMedia() as well, right?

This comment has been minimized.

Copy link
@alvestrand

alvestrand Jan 12, 2017

Contributor

navigator.getUserMedia() is a shell around navigator.mediaDevices.getUserMedia(), so no.

This comment has been minimized.

Copy link
@zcorpan

This comment has been minimized.

Copy link
@stefhak

stefhak Jan 13, 2017

Author Contributor

@zcorpan I like your proposal to use "settings object" and "responsible document" rather than "context object" and "node document".

One thing I was thinking about when doing this though was if we (some time) would allow a worker to use gUM. Would it still be clear what the "responsible document" is?

@stefhak

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2017

I updated as proposed by @zcorpan in https://github.com/w3c/mediacapture-main/pull/427/files/36c8de191cef114cf52964b3e35d2f2cb6140d47#r95865625 with except for that I kept it at returning a rejected promise rather than throwing (we did discuss and agree that is the right way, right?).

@zcorpan

This comment has been minimized.

Copy link
Member

commented Jan 13, 2017

Oops. Yeah that was sloppy copy-paste on my part.

Copy link
Contributor

left a comment

Approve of content, with nit.

<p>The term <dfn><a href="https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use">
allowed to use</a></dfn> is defined in WHATWG (note we don't have a proper
ref added, in addition it seems HTML5.1 will(?) add defintion
of this term).</p>

This comment has been minimized.

Copy link
@alvestrand

alvestrand Jan 19, 2017

Contributor

Suggest removing parenthesis before merging.

allowed to use</a></dfn> is defined in WHATWG (note we don't have a proper
ref added, in addition it seems HTML5.1 will(?) add defintion
of this term).</p>
allowed to use</a></dfn> is defined in WHATWG.</p>

This comment has been minimized.

Copy link
@zcorpan

zcorpan Jan 19, 2017

Member

Should probably say WHATWG HTML

This comment has been minimized.

Copy link
@stefhak

stefhak Jan 19, 2017

Author Contributor

Thanks, added that.

@alvestrand alvestrand merged commit 6111095 into w3c:master Jan 19, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
ipr PR deemed acceptable.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.