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

Re: IDL/API feedback

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 8 Apr 2013 07:08:18 +0200
Message-ID: <516250C2.6080003@ericsson.com>
To: Anne van Kesteren <annevk@annevk.nl>
CC: "public-media-capture@w3.org" <public-media-capture@w3.org>

Thank you for reviewing the document. Find answers inline.

On 2013-04-07 12:57, Anne van Kesteren wrote:
> 1) MediaStreamTrack needs to inherit from EventTarget.
> 2) The addtrack and removetrack events are not defined. In particular,
> when they are dispatched.

Both of the above issues were fixed recently, but haven't made it into a 
released version yet. They are available on github [1].

> 3) The constructor for MediaStream should probably a sequence of
> MediaStreamTrack, not an IDL array.

It's not a big deal, but wouldn't a sequence introduce an extra (and 
unnecessary) copy of the array when it's passed by value? Are there any 
general guidelines for array-like input arguments? I've seen that at 
least the WebSocket constructor uses a DOMString[] for its protocols 

> 4) "Constructor ()" should just be "Constructor", but maybe better
> would be to make the single argument optional and use "or" to
> distinguish the two types.

Like this?

Constructor (optional (MediaStream or MediaStreamTrack[]) trackContainer)

What would work for me. The tricky thing is to come up with a suitable 
name for the single argument. It's easier when you simply can call it 
"data". :)


(note that links don't work)
Received on Monday, 8 April 2013 05:08:50 UTC

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