Changing track sources...

In the call, it was mentioned that we have a requirement to be able to change the source of a track while preserving the identity of the track for the purposes of a PeerConnection and possibly other reasons.

I'm moving forward with a proposal to allow this, but I ran into an interesting question that I'd like the group's thoughts on:

Once you allow a track to be able to change its source, what do we do about a track's "ended" state? 

Previously, a track's lifetime was pretty clear: once it was created it was either "muted" or "live" and at some point (by way of "stop()") the track transitions to "ended" and is no longer usable. Now, consider that we can swap the source of a track at any time. When this happens, it is now possible for a track to have a state transition from the "ended" state back to "live" or "muted" (in accordance with the track's new source). Do we want to allow this?

We can continue to enforce the current state transitions by forbidding changing of a source of a track after it transitions to "ended", but this seems very artificial to me.

-Travis

Received on Friday, 7 December 2012 17:57:16 UTC