Comparing version 1.8.2 to 1.9.0
{ | ||
"name": "webrtc", | ||
"version": "1.8.2", | ||
"version": "1.9.0", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "webrtc", |
@@ -71,3 +71,10 @@ var util = require('util'); | ||
if (!self.hardMuted) { | ||
self.sendToAll('speaking'); | ||
// FIXME: should use sendDirectlyToAll, but currently has different semantics wrt payload | ||
self.peers.forEach(function (peer) { | ||
if (peer.enableDataChannels) { | ||
var dc = peer.getDataChannel('hark'); | ||
if (dc.readyState != 'open') return; | ||
dc.send(JSON.stringify({type: 'speaking'})); | ||
} | ||
}); | ||
} | ||
@@ -77,3 +84,10 @@ }); | ||
if (!self.hardMuted) { | ||
self.sendToAll('stopped_speaking'); | ||
// FIXME: should use sendDirectlyToAll, but currently has different semantics wrt payload | ||
self.peers.forEach(function (peer) { | ||
if (peer.enableDataChannels) { | ||
var dc = peer.getDataChannel('hark'); | ||
if (dc.readyState != 'open') return; | ||
dc.send(JSON.stringify({type: 'stoppedSpeaking'})); | ||
} | ||
}); | ||
} | ||
@@ -242,6 +256,2 @@ }); | ||
this.parent.emit('connectivityError', self); | ||
} else if (message.type === 'speaking') { | ||
this.parent.emit('speaking', {id: message.from}); | ||
} else if (message.type === 'stopped_speaking') { | ||
this.parent.emit('stopped_speaking', {id: message.from}); | ||
} else if (message.type === 'mute') { | ||
@@ -248,0 +258,0 @@ this.parent.emit('mute', {id: message.from, name: message.payload.name}); |
Sorry, the diff of this file is too big to display
151764
9
4135