Capabilities vs SupportedConstraints

Hey,

this might be a stupid question...but what's the real difference between 
Capabilities and SupportedConstraints.

I can see that getSupportedConstraints() is attached at the MediaDevices 
level and getCapabilities() is attached at the MST level.

And I can see that the data structures returned are different because 
getSupportedConstraints(kind) returns a dictionary with only true 
values, while getCapabilities() returns a Constraints structure where 
the values are either ranges or enums. (e.g. getCapabilities returns 
Constraints?!).

It seems to me that under the hood Capabilities and SupportedConstraints 
are effectively the same concept.

I can see why there might be some fingerprinting/privacy issues if the 
method that hung off MediaDevices returned the full set of 
SupportedConstraints (e.g. before the stream permissions were granted, 
etc.). But calling these two things by completely different (but 
somewhat interchangeable) names seems a bit confusing.

I really like the conceptual clarity of the ConstrainablePattern model, 
but my mind is having trouble parsing this aspect of it.

Or have I misunderstood this in some way?

roBman

Received on Saturday, 1 November 2014 01:05:41 UTC