W3C home > Mailing lists > Public > public-media-capture@w3.org > October 2013

Re: Constraints as a separate interface

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Wed, 16 Oct 2013 13:59:28 -0400
Message-ID: <525ED400.1020900@mozilla.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:20 UTC