Constructors and cloning

Hi

In the current spec, we have the following APIs to create new instances 
of MediaStream and MediaStreamTrack:

------------
MediaStream() constructor
  - sequence<MediaStreamTrack>
  - MediaStream (used to clone the given stream, but behavior changed 
(accidentally?) when we switched to explicit cloning of tracks)

MediaStream.clone()

AudioStreamTrack() constructor
  - Constraints

VideoStreamTrack() constructor
  - Constraints

MediaStreamTrack.clone()
------------

I belive the API surface we expose for this functionality is a whole lot 
bigger than it would have to be. The Audio/VideoStreamTrack interfaces 
are empty now when getSourceIds() have become getDevices() on Navigator. 
I think we could get away with something like below:

------------
MediaStream() constructor
  - sequence<MediaStreamTrack> (add specified tracks to new stream)
  - MediaStream (clone given stream; including tracks)

MediaStreamTrack() constructor
  - kind, Constraints (replaces constructors on derived types)
  - MediaStreamTrack (clone given track)
------------

/Adam

Received on Monday, 4 November 2013 09:52:03 UTC