Re: Proposal on how to introduce constraints in getUserMedia()

Le jeudi 22 mars 2012 à 13:15 +0100, Adam Bergkvist a écrit :
> One way forward could be to have the constraints dictionary as a member 
> of the existing MediaStreamOptions dictionary.
> 
> void getUserMedia (MediaStreamOptions? options,
>                     NavigatorUserMediaSuccessCallback? successCb,
>                     optional NavigatorUserMediaErrorCallback? errorCb);
> 
> dictionary MediaStreamOptions {
>      boolean audio;
>      boolean video;
>      MediaStreamConstraints? constraints;
> };
> 
> This actually has some benefits:
> - We can add the constraints dictionary member to MediaStreamOptions at 
> any time without breaking existing code.

This sounds good; I guess we need a specific provision that a user agent
should not return a MediaStream if it is not able to interpret the
constraints object.

Dom

Received on Thursday, 22 March 2012 12:47:38 UTC