use SendRecv transceiver instead of Sendonly

This commit is contained in:
David Zhao
2021-02-02 22:47:36 -08:00
parent a4266478c5
commit 88e247d95a
+2 -1
View File
@@ -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