Re: [webrtc-pc] need to clear [[AssociatedMediaStreams]] in removeTrack?

I don't think we need to clear [[AssociatedMediaStreams]] slot, rather getLocalStreams() implemented on top of getSenders() should filter out any senders whose transceiver's direction is not sendonly or sendrecv. This is compatible with all the other ways of manipulating senders/transceivers and makes sense for what getLocalStreams() is supposed to do; get streams which are "actively" associated with the PC.

This is better than hunting down places where [[AssociatedMediaStreams]] might otherwise have to be updated. If you pause and resume a transceiver by changing its direction for example, it would be unexpected that the streams have been reset. If we make [[AssociatedMediaStreams]] mutable we would have to introduce a bunch of stream APIs to the sender/transceiver.

Speaking of which, it would be helpful to have it exposed as sender.streams, but readonly as to not increase the complexity of this already complicated model.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1756#issuecomment-368442493 using your GitHub account

Received on Monday, 26 February 2018 09:38:47 UTC