From b0e12b07375074a72974c2c9c35e0ecb9d2b2063 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 25 Apr 2020 11:47:14 +0200 Subject: [PATCH] Request RTCP feedback explicitly. Chrome sends us feedback anyway, but it cannot harm, can it? --- group.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/group.go b/group.go index 33a6386..0bf16bd 100644 --- a/group.go +++ b/group.go @@ -97,10 +97,17 @@ func addGroup(name string, desc *groupDescription) (*group, error) { if groups.groups == nil { groups.groups = make(map[string]*group) m := webrtc.MediaEngine{} - m.RegisterCodec(webrtc.NewRTPVP8Codec( - webrtc.DefaultPayloadTypeVP8, 90000)) + m.RegisterCodec(webrtc.NewRTPVP8CodecExt( + webrtc.DefaultPayloadTypeVP8, 90000, + []webrtc.RTCPFeedback{ + webrtc.RTCPFeedback{"goog-remb", ""}, + webrtc.RTCPFeedback{"nack", "pli"}, + }, + "", + )) m.RegisterCodec(webrtc.NewRTPOpusCodec( - webrtc.DefaultPayloadTypeOpus, 48000)) + webrtc.DefaultPayloadTypeOpus, 48000, + )) groups.api = webrtc.NewAPI( webrtc.WithMediaEngine(m), )