Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Harardin/a148e2d18f0468ff29c05bc4e9689a68 to your computer and use it in GitHub Desktop.

Select an option

Save Harardin/a148e2d18f0468ff29c05bc4e9689a68 to your computer and use it in GitHub Desktop.

Revisions

  1. @Sean-Der Sean-Der created this gist Apr 10, 2019.
    22 changes: 22 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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)
    }