getDeviceInfos and capabilities()

Hello,

I just want to verify something....
in the "device info" proposal we agreed to earlier, the following static 
method is added:

interface MediaStreamTrack {
     static sequence<SourceInfo> getSourceInfos()
}

dictionary SourceInfo {
    DOMString id;  // same as "sourceid" in previous proposal
    DOMString kind;  // "video" or "audio"
    DOMString label;  // only present if authorized
    VideoFacingModeEnum facing;  // only for video sources
}

One thing this allows is to get the list of all valid sourceId values. 
But it gives more information than that, on a per-device basis.

This has not yet been added to the draft.

The capabilities() call in the latest editors' draft also gives the list 
of all valid sourceId values, but in a slightly different context:

interface MediaStreamTrack : EventTarget {
    ....
     (AllVideoCapabilites or AllAudioCapabilities) capabilities ();
    ....
}

dictionary AllVideoCapabilities {
     CapabilityList?  sourceType;
     CapabilityList?  sourceId;
     CapabilityRange? width;
     CapabilityRange? height;
     CapabilityRange? frameRate;
     CapabilityList?  facingMode;
};

This gives all possible values of sourceId as well as facingMode, but 
doesn't match them up - you can't tell from the fact that "front" and 
"back" are present in the capabilities which sourceId belongs to which 
camera.

Two possible directions to go in:

- No change. Just add the getSourceInfos call as described, and keep the 
capabilities() as is - separate.
- Modify the capabilities() call to return a structure more like 
SourceInfo, where the capabilities of each individual device are 
enumerated separately - effectively, merging the two functionalities.

This moves the target of capabilties() somewhat - from describing what 
the legal ranges of constraints are to describing what acceptable ranges 
of constraints on specific devices are.

By nature, I'm conservative, so I'd prefer the first alternative. But 
I'm only one participant.

What do people think?

                 Harald

Received on Wednesday, 15 May 2013 13:01:49 UTC