fixed server initiated negotiation

This commit is contained in:
David Zhao
2020-11-11 00:02:37 -08:00
parent 40be24bf60
commit 256328c4ff
5 changed files with 65 additions and 28 deletions
+5 -5
View File
@@ -16,7 +16,7 @@ var (
// Peer track represents a track that needs to be forwarded
type PeerTrack struct {
id uint32
id string
ctx context.Context
peerId string
// source track
@@ -32,7 +32,7 @@ type PeerTrack struct {
func NewPeerTrack(ctx context.Context, peerId string, rtcpWriter RTCPWriter, track *webrtc.Track, receiver *Receiver) *PeerTrack {
return &PeerTrack{
id: track.SSRC(),
id: track.ID(),
ctx: ctx,
peerId: peerId,
track: track,
@@ -111,9 +111,9 @@ func (t *PeerTrack) forwardWorker() {
}
now := time.Now()
logger.GetLogger().Debugw("read packet from track",
"peerId", t.peerId,
"track", t.track.ID())
//logger.GetLogger().Debugw("read packet from track",
// "peerId", t.peerId,
// "track", t.track.ID())
t.lock.RLock()
for dstPeerId, forwarder := range t.forwarders {
// There exists a bug in chrome where setLocalDescription