- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Tue, 21 May 2013 08:20:42 +0200
- To: Randell Jesup <randell-ietf@jesup.org>
- CC: public-media-capture@w3.org
On 2013-05-07 20:35, Randell Jesup wrote: > On 5/7/2013 10:08 AM, Dan Burnett wrote: >> g) Section 4.2.2: We could collapse getVideoTracks() and >> getAudioTracks() into a single method, e.g. getTracks (optional >> DOMString type), where type can be "video" or "audio". >> We have gone back and forth on this one as a group. Personally I >> hate having everything separated by media type, but the consensus in >> the group has largely been in favor of this separation. > > I honestly don't see a need for the separation. I'm in favor for the separated lists for the following reasons: * It's easier to combine the type-specific lists into one that to split them up. Combining is just a list concat. * It's easy to check if a stream contains media of a certain type. Just check the length of the corresponding list. * It's tempting to assume that if a media type isn't audio, then it's video since we only support those types a.t.m. Code using that pattern would risk breaking if we introduced new media types into a combined list. * Regarding supporting new media types: support for new media types will simply be additions to the API. For example, a new type will get it's own get<Type>Tracks(). Old applications, that doesn't have code to do track level operations on the new type won't have to deal with it. /Adam
Received on Tuesday, 21 May 2013 06:21:07 UTC