W3C home > Mailing lists > Public > public-media-capture@w3.org > August 2013

Proposal: Explicit "Get access to media" call

From: Harald Alvestrand <harald@alvestrand.no>
Date: Thu, 29 Aug 2013 14:37:17 +0200
Message-ID: <521F407D.6070203@alvestrand.no>
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
One of the problems with the current method of getting access to media
is that it occurs as a side effect of a call done for other purposes

The parameters for this aren't ideal to determine the full range of
permissions that a page would want - for instance, a page might first
open a video device, and later open an audio device separately; in our
current models, that would give 2 permissions prompts.

Instead of doing it this way, we could make an explicit call:

void GetMediaPermissions(Permissions permissions,
                            successCallback, errorCallback)

Permissions = enum(
  // and maybe extend this to

The UA could then use the list of permissions requested to construct an
appropriate UI element for asking permission from the user (or use a
stored permissions model to grant access immediately, if that's the
Right Thing).
In any case, all programs that know what class of permissions they want
can get those permissions with one call, one prompt, no matter what they
do later.

For backwards compatibility, getUserMedia would be documented to have an
implicit call to GetMediaPermissions "behind the curtains".

Does this make more sense?


Surveillance is pervasive. Go Dark.
Received on Thursday, 29 August 2013 12:37:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:19 UTC