1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Wait for answer before sending data.

This commit is contained in:
Juliusz Chroboczek 2020-05-21 00:55:00 +02:00
parent 47d23658b5
commit a290325320

View file

@ -702,13 +702,16 @@ func addDownTrack(c *client, conn *downConnection, remoteTrack *upTrack, remoteC
rate: estimator.New(time.Second),
}
conn.tracks = append(conn.tracks, track)
remoteTrack.addLocal(track)
go rtcpDownListener(conn, track, s)
return s, nil
}
func activateDownTrack(conn *downConnection, track *downTrack) {
track.remote.addLocal(track)
}
const (
minLossRate = 9600
initLossRate = 512 * 1000
@ -1003,6 +1006,10 @@ func gotAnswer(c *client, id string, answer webrtc.SessionDescription) error {
if err != nil {
return err
}
for _, t := range conn.tracks {
activateDownTrack(conn, t)
}
return nil
}