Thanks Randell very much. These responses are really helpful. I just have two follow-up comments. Please see the in-line.
> > 2. It seems the pop-up prompt and the user's selection are always needed > > to specify the media source. Can we directly specify it when calling > > getUserMedia()? Say, the user only wants to retrieve the MediaStream > > through the specific HDMI device. > > See the spec - we plan to allow specifying specific devices via opaque > identifiers. Chrome has this now IIRC. This allows an application to > default to "same camera as last time". > > > 3. Follow #2, the Constraints may help us do so but it is aimed to apply > > the constraints (source settings) on the media source, instead of > > selecting the media source. Does setting sourceId in the constrain > > exactly work for this purpose [3][5]? > > yes. > > > 4. Follow #3, does the deviceId in MediaDeviceInfo [4] match the sourceId > > at [5]? That would be helpful if we can set the deviceId in the > > constraint to getUserMedia() as mentioned above. > > Without re-checking the spec, I believe the answer is yes. Sounds great! So, as far as I understand based on #2/#3/#4, we can use: 1. getMediaDevices() to get all available MediaDeviceInfos where each of them carries a |deviceId|. 2. Then we can further set the |deviceId| as one of the constraint to call getUserMedia(), so that we can specify from which source (e.g., camera, HDMI... etc) we want to retrieve the MediaStream. If so, I'd suggest s/deviceId/sourceId to align the spec [1] between getMediaDevices() and getUserMedia() to avoid misunderstanding. I can fire a bug for it if you think it makes sense. [1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaDeviceInfo-deviceId > We need to support "hot-plug" of devices while the request is up; we > have a design for doing so but haven't detailed it yet. That's focused > on internal use; no W3 discussion of change notification has occurred > for public APIs IIRC (and certainly no API for it yet). Yeap, I'm afraid this would become one bottleneck for our coming TV products. We already have getMediaDevices() to generate the menu of currently available input sources. However, this menu has to be dynamically reflecting to the "hot-plug" devices. For example, if the user is right now watching the input menu and plugging in an HDMI input at the same time, (s)he would expect to immediately see the new HDMI item showing up on the menu, without refreshing it. It seems we have to wait for the new spec coming up before moving forward. I wonder if there is any work-around for Mozilla internal needs (only certified app needs this I think). Does it sound reasonable to directly add an event under the window just like the GamepadEvent [2]? [2] https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#gamepadevent-interface Thanks again for your feedback! Cheers, Gene _______________________________________________ dev-media mailing list [email protected] https://lists.mozilla.org/listinfo/dev-media

