Skip to content

Commit

Permalink
Revert sfu-ws changes
Browse files Browse the repository at this point in the history
RID/MID has been disabled in pion/webrtc@v3 so we no longer have an
issues signaling.
  • Loading branch information
Sean-Der committed Feb 9, 2021
1 parent 2f76ba9 commit 166d375
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions sfu-ws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,26 +229,8 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
// When this frame returns close the Websocket
defer c.Close() //nolint

// Create a MediaEngine object to configure the supported codec
m := &webrtc.MediaEngine{}

// Setup the codecs you want to use.
// We'll use a VP8 and Opus but you can also define your own
if err = m.RegisterCodec(webrtc.RTPCodecParameters{
RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeVP8, ClockRate: 90000, Channels: 0, SDPFmtpLine: "", RTCPFeedback: nil},
PayloadType: 96,
}, webrtc.RTPCodecTypeVideo); err != nil {
panic(err)
}
if err = m.RegisterCodec(webrtc.RTPCodecParameters{
RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeOpus, ClockRate: 48000, Channels: 2, SDPFmtpLine: "minptime=10; useinbandfec=1", RTCPFeedback: nil},
PayloadType: 111,
}, webrtc.RTPCodecTypeAudio); err != nil {
panic(err)
}

// Create new PeerConnection
peerConnection, err := webrtc.NewAPI(webrtc.WithMediaEngine(m)).NewPeerConnection(webrtc.Configuration{})
peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{})
if err != nil {
log.Print(err)
return
Expand Down

0 comments on commit 166d375

Please sign in to comment.