Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/gstreamer-send/main.go b/gstreamer-send/main.go
index 3a2ab8c..df5df2a 100644
--- a/gstreamer-send/main.go
+++ b/gstreamer-send/main.go
@@ -27,8 +27,16 @@ func main() {
},
}
+ m := webrtc.MediaEngine{}
+ s := webrtc.SettingEngine{}
+
+ s.SetEphemeralUDPPortRange(5000, 5000)
+ m.RegisterDefaultCodecs()
+
+ api := webrtc.NewAPI(webrtc.WithMediaEngine(m), webrtc.WithSettingEngine(s))
+
// Create a new RTCPeerConnection
- peerConnection, err := webrtc.NewPeerConnection(config)
+ peerConnection, err := api.NewPeerConnection(config)
if err != nil {
panic(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.