Re: Using tracks instead of streams

On 12 November 2013 00:18, Adam Bergkvist <adam.bergkvist@ericsson.com> wrote:
> One thing that I find a bit odd is:
>
> pc.addSendTrack(track);
> pc.sendTracks[0] == track; // false (different types)

It's more like:

pc.addSendTrack(track) === pc.sendTracks[0];

> We could have the script construct a DooHickey and add it to the
> PeerConnection.
>
> // A-side
> var hickey = new DooHickey(track);
> peerConn.addDooHickey(hickey);

That seems like busy work.  It also means that you can't make the
special linkage that a Doohickey needs with RTCPeerConnection.

> // B-side
> ondoohickey  = function (evt) {
>   hickey = evt.dooHickey;
>   remoteVideo.srcObject = new MediaStream([hickey.track]);
> };

I see no reason that evt.track doesn't point to the track.  AND,
track.streams[0] should be populated with a newly created stream.

Received on Tuesday, 12 November 2013 08:54:48 UTC