- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Tue, 17 Apr 2012 09:57:32 +0200
- To: William Lin <chaer.lin@gmail.com>
- CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
Thanks for posting again (to the list). On 2012-04-17 02:46, William Lin wrote: > > On Fri, Apr 13, 2012 at 10:58 PM, Adam Bergkvist > <adam.bergkvist@ericsson.com <mailto:adam.bergkvist@ericsson.com>> wrote: > 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 > > it is a good idea. Unfortunately, in current spec, we can construct new > MediaStream while no way to stop it(MediaStream can't support stop().) > And, to preview these 'several tracks' in on LocalMediaStream is > complicated. You're right that you can't stop the derived MediaStream directly, but the tracks that originated from the LocalMediaStream can end which will will result in the MediaStream finishing. For example, if you create a new MediaStream from some of the tracks of a LocalMediaStream and call stop() on the LocalMediaStream, then the MediaStream will finnish as well. The spec talks about how a MediaStreamTrack can have a strong or weak reference to its source in [1]. [1] http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamtrack /Adam
Received on Tuesday, 17 April 2012 07:58:02 UTC