Created
April 10, 2019 05:54
-
-
Save Sean-Der/80cfd8e0555c51ade56aa73f86b1a965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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