From 88e247d95a00eae7598171e3d723a19242043695 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Tue, 2 Feb 2021 22:47:36 -0800 Subject: [PATCH] use SendRecv transceiver instead of Sendonly --- pkg/rtc/mediatrack.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/mediatrack.go b/pkg/rtc/mediatrack.go index 121a3e0d..737677af 100644 --- a/pkg/rtc/mediatrack.go +++ b/pkg/rtc/mediatrack.go @@ -132,7 +132,7 @@ func (t *MediaTrack) AddSubscriber(participant types.Participant) error { } transceiver, err := participant.PeerConnection().AddTransceiverFromTrack(outTrack, webrtc.RTPTransceiverInit{ - Direction: webrtc.RTPTransceiverDirectionSendonly, + Direction: webrtc.RTPTransceiverDirectionSendrecv, }) if err != nil { return err @@ -354,6 +354,7 @@ func (t *MediaTrack) handleRTCP(dt *sfu.DownTrack, identity string, rtcpBuf []by if err == io.EOF { break } else if err != nil { + logger.Warnw("error getting buffered packet", "error", err) continue } // what about handling write errors such as no packet found