Fix deprecation cutover, and bad SDP creation

Methods that were marked as deprecated weren't properly handled. There
was a mix of old+new ones supported which caused broken behavior.

SDP creation didn't add SCTP to Offer

Resolves #156
This commit is contained in:
Sean DuBois
2018-09-18 23:02:25 -07:00
parent e496511145
commit cc4160f3ad
5 changed files with 11 additions and 28 deletions

View File

@@ -61,7 +61,7 @@ func main() {
datachannels := make([]*webrtc.RTCDataChannel, 0)
var dataChannelsLock sync.RWMutex
peerConnection.Ondatachannel = func(d *webrtc.RTCDataChannel) {
peerConnection.OnDataChannel = func(d *webrtc.RTCDataChannel) {
dataChannelsLock.Lock()
datachannels = append(datachannels, d)
dataChannelsLock.Unlock()