Re: Questions/Comments on Media Stream Recording

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