- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Fri, 27 Jun 2014 10:39:50 +0200
- To: Shijun Sun <shijuns@microsoft.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 2014-06-25 18:45, Shijun Sun wrote: > Resend to correct a typo --- > > In the latest version of the draft, there are two ways to call > getUserMedia() within the NavigatorUserMedia. > > #1: NavigatorUserMedia.getUserMedia(); > #2: NavigatorUserMedia.MediaDevices.getUserMedia(); > > Could someone share the rationale why we need the 2nd option? I > couldn't find any spec bug that led to the change. It seems it also > kind of limits future extension of getUserMedia () beyond the media > devices. > Hi The discussion about the MediaDevices object started around here [1]. We needed an object to be the EventTarget for the new event that tells the script that a new media device is connected, and we didn't want that object to be Navigator. Once we had an object that collected the functions related to local media devices it seemed to be a pretty natural place for getUserMedia() as well. There wasn't a lot of people involved in this discussion so more input is welcome. Regarding future extensions, the function is called getUser_Media_() so perhaps it shouldn't be extended beyond media devices anyhow. Additionally, getUserMedia() is pretty tightly coupled with Constraints and that might be unnecessary complexity for other types of devices. [1] http://lists.w3.org/Archives/Public/public-media-capture/2014May/0243.html
Received on Friday, 27 June 2014 08:40:16 UTC