Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "webrtc", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "webrtc", |
@@ -180,5 +180,7 @@ var webrtc = require('webrtcsupport'); | ||
self.peers.forEach(function (peer) { | ||
var dc = peer.getDataChannel('hark'); | ||
if (dc.readyState != 'open') return; | ||
dc.send(JSON.stringify({type: 'volume', volume: volume })); | ||
if (peer.enableDataChannels) { | ||
var dc = peer.getDataChannel('hark'); | ||
if (dc.readyState != 'open') return; | ||
dc.send(JSON.stringify({type: 'volume', volume: volume })); | ||
} | ||
}); | ||
@@ -272,3 +274,4 @@ }); | ||
this.stream = options.stream; | ||
this.enableDataChannels = options.enableDataChannels || this.parent.config.enableDataChannels; | ||
this.enableDataChannels = options.enableDataChannels === undefined ? this.parent.config.enableDataChannels : options.enableDataChannels; | ||
this.receiveMedia = options.receiveMedia || this.parent.config.receiveMedia; | ||
this.channels = {}; | ||
@@ -327,4 +330,4 @@ // Create an RTCPeerConnection via the polyfill | ||
// auto-accept | ||
self.pc.answer(self.parent.config.receiveMedia, function (err, sessionDesc) { | ||
self.send('answer', sessionDesc); | ||
self.pc.answer(self.receiveMedia, function (err, sessionDescription) { | ||
self.send('answer', sessionDescription); | ||
}); | ||
@@ -414,3 +417,3 @@ }); | ||
this.pc.offer(this.parent.config.receiveMedia, function (err, sessionDescription) { | ||
this.pc.offer(this.receiveMedia, function (err, sessionDescription) { | ||
self.send('offer', sessionDescription); | ||
@@ -417,0 +420,0 @@ }); |
Sorry, the diff of this file is too big to display
150107
4118