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

Re: Questions/Comments on Media Stream Recording

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 27 May 2013 11:16:45 +0200
Message-ID: <51A3247D.5020509@ericsson.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>
CC: "Mandyam, Giridhar" <mandyam@quicinc.com>, "robert@ocallahan.org" <robert@ocallahan.org>, "Frederick.Hirsch@nokia.com" <Frederick.Hirsch@nokia.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 2013-05-24 21:37, Jim Barnett wrote:
> Answers in-line set of by ‘>>’ to the extent that I have them:
>
> Let me preface by saying that I am not arguing for a getStream()
> method.  Just had some questions.  Assume the following:
>
> --Code snippet--
>
> var mediaRecorder = new MediaRecorder(someStream);
>
> mediaRecorder.ondataavailable = gotChunk;
>
> mediaRecorder.start(timeSlice); // Start incremental recording
>
> function gotChunk(evt) {
>
>                  var recStream = evt.target.stream;
>
>                  var recStreamTrack = recStream.getTrackbyID(0);  //
> Assumption that there is always a track ID 0
>
>                  rec.StreamTrack.applyConstraints({mandatory:  […]);
>
>                  }
>
> --Code snippet ends--
>
> My questions are (assuming that the code example I provided above is
> mostly accurate):
>
> 1.Is recStream a clone of the MediaStream used in the contructor?
>
>>> No.  I don’t see any reason to clone.

Right. You're just referencing the object here.

The MediaStream() constructor used to create clones, but that made the 
API very strange to use when new independent clones were created 
implicitly. The only way to get a clone with the current spec is to 
explicitly clone an instance of a stream or track.

/Adam
Received on Monday, 27 May 2013 09:17:13 UTC

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