- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Fri, 13 Apr 2012 16:58:32 +0200
- To: William Lin <chaer.lin@gmail.com>
- CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
On 2012-04-12 04:53, William Lin wrote: > Hi, > > in these days, Constraints and Capabilities API for getUserMedia were > discussed while i found one scenario doesn't be covered: > "users may want to initiate capture from multiple devices at one time in > multiple media streams" (refer to > http://www.w3.org/TR/capture-scenarios/#multiple-active-devices). > is it possible adding the options to set the number of active devices? > and the callback function needs to change: > > > 2.1.3 NavigatorUserMediaSuccessCallback > > [Callback=FunctionOnly, NoInterfaceObject] > interfaceNavigatorUserMediaSuccessCallback { > void handleEvent (LocalMediaStream stream); > }; > > --> > > [Callback=FunctionOnly, NoInterfaceObject] > interfaceNavigatorUserMediaSuccessCallback { > void handleEvent (LocalMediaStream[] streams); > }; It't true that it's not possible to specify how many devices the app wants to get access to. However, the API does support the case where the user selects several devices of the same type. The result is one LocalMediaStream object with several tracks of each type. The developer can then split the single LocalMediaStream by constructing new MediaStream objects from the tracks of the LocalMediaStream. /Adam
Received on Friday, 13 April 2012 14:59:01 UTC