W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2012

Re: Synchronous getUserMedia proposal

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 5 Nov 2012 11:41:45 +0100
Message-ID: <509797E9.2070807@ericsson.com>
To: Martin Thomson <martin.thomson@gmail.com>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
On 2012-11-02 19:32, Martin Thomson wrote:
> In its simplest form:
> MediaStream getUserMedia(MediaConstraints constraints);
> This returns a stream that provides no content (open option: a tainted
> stream that can only be displayed locally).
> Consent is indicated with a new onconsent event on the stream; failure
> reuses the onended event.  A new reason parameter is added to the
> onended event indicating the reason (this includes all existing onended
> reason codes, if any, plus all getUserMedia error codes).
> The major complaint with this is that it leads to an
> inaccurate/misleading expectation about the usability of the stream.
> That expectation can lead to the assumption that consent is granted,
> which would be a bad assumption.

This approach is not flawless, but to me it seems like the most 
reasonable one at the moment.

We already have the concept of a stream that is dispatched to JavaScript 
but the source is not ready to provide data yet. This currently happens 
when you receive a stream over a PeerConnection and all the tracks are 
muted until data arrives over the network. I think gUM() with a return 
value could be treated similarly, and local data is suspended until the 
user grants permission.

In the network case, a media description is used to create the stream 
and the receiving side and it's pretty capable of describing future 
stream content. In our local case, the user may only grant one media 
component. Perhaps ended track state is good enough to solve this.

I think we'll freak people out if a tainted stream is delivered at once. 
Even though page authors can't access the content or transport the 
stream, they can mix the camera view into the page content and that may 
make people uncomfortable (depending on the page they're visiting).

Received on Monday, 5 November 2012 10:42:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:31 UTC