protocol update: explicit AddTrack to move negotiation initiation to server side.

In order to avoid race conditions with WebRTC, where either side could initiate an offer when tracks have changes, we'll always initiate them from the SFU side.
This commit is contained in:
David Zhao
2021-01-09 23:40:29 -08:00
parent 0336e9d92f
commit 258f5add2d
34 changed files with 2218 additions and 1657 deletions
+2 -2
View File
@@ -113,11 +113,11 @@ func (d *DownTrack) Kind() webrtc.RTPCodecType {
}
// WriteRTP writes a RTP Packet to the DownTrack
func (d *DownTrack) WriteRTP(p *rtp.Packet) error {
func (d *DownTrack) WriteRTP(p rtp.Packet) error {
if !d.IsBound() {
return nil
}
return d.writeSimpleRTP(*p)
return d.writeSimpleRTP(p)
}
func (d *DownTrack) CreateSourceDescriptionChunks() []rtcp.SourceDescriptionChunk {