webrtc
webrtc copied to clipboard
on_track fires too late
The on_track event currently fires too late, it should fire after setting a remote answer, but instead it only fires after the first RTP packets are received. What should happen when the first RTP packets are received is: an on_unmute event should fire.
Firing on_track earlier
The most significant problem with firing on_track earlier is that we need StreamInfo and therefor an SSRC to do this. With unsignalled SSRCs we cannot know the SSRC until the first packet is received. This also relates to binding the interceptors, which currently happens just before on_track.
We'd need to introduce a new on_unmute event(which is probably when the interceptor chain should be bound).
StreamInfo couldn't contain SSRC or at the very least it would need to be Option since we won't always have it when firing on_track
This is somewhat related to #387 and #386