Re: Constraints as a separate interface

On 10/15/13 10:52 AM, Jim Barnett wrote:
>
> So I want to be able to add _/some/_ succinct expression to the 
> definition of MediaRecorder that makes it clear that you can query 
> it’s Capabilities and Settings, and affect the Settings by applying 
> Constraints.  Furthermore, any spec that wants to use this interface 
> should need to list only the relevant Capabilities and their 
> types/ranges.    If someone will tell me what the correct webIDL for 
> this is, I’ll be glad to use it.
>

We could have a method returning a separate interface I suppose:

     partial interface MediaStreamTrack {
         Constrainable getConstrainable();
     };

Or if all you're looking for is a specification editorial aide, then 
maybe this:

     interface MediaStreamTrack : Constrainable { ...
     };

     partial interface MediaRecorder {
         // NOTE: Constrainable interface goes here
     };

     interface Constrainable { ...
     };

Unfortunately, MediaRecorder already inherits from EventTarget and 
webidl doesn't allow multiple inheritance, so that one gets a little ugly.

.: Jan-Ivar :.

Received on Wednesday, 16 October 2013 17:59:57 UTC