[webrtc-pc] "track" event will fire extra times if applying multiple remote offers

taylor-b has just created a new issue for https://github.com/w3c/webrtc-pc:

== "track" event will fire extra times if applying multiple remote offers ==
> If direction is "sendrecv" or "recvonly", and transceiver's [[CurrentDirection]] slot is neither "sendrecv" nor "recvonly", process the addition of a remote track for the media description, given transceiver and trackEvents.

If I follow these steps to the letter, then if I apply multiple remote offers in a row (which JSEP does allow), I'll get multiple track events, because [[CurrentDirection]] will still be null.

Is the solution to replace "[[CurrentDirection]]" with "the direction of the corresponding m= section in the last applied remote description," or something along those lines? Remember that the purpose of this rule is to get an event when the direction changes from "sending" to "not sending" and back again.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1729 using your GitHub account

Received on Wednesday, 10 January 2018 00:29:55 UTC