|
@@ -310,6 +310,15 @@ ConnectionManager.prototype.handleCandidate = function(message) {
|
|
|
util.log('Added ICE candidate.');
|
|
|
};
|
|
|
|
|
|
+/** Updates label:[serialization, reliable, metadata] pairs from offer. */
|
|
|
+ConnectionManager.prototype.handleUpdate = function(updates) {
|
|
|
+ var labels = Object.keys(updates);
|
|
|
+ for (var i = 0, ii = labels.length; i < ii; i += 1) {
|
|
|
+ var label = labels[i];
|
|
|
+ this.labels[label] = updates[label];
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
/** Handle peer leaving. */
|
|
|
ConnectionManager.prototype.handleLeave = function() {
|
|
|
util.log('Peer ' + this.peer + ' disconnected.');
|
|
@@ -405,11 +414,4 @@ ConnectionManager.prototype.call = function(stream, options) {
|
|
|
return connection;
|
|
|
};
|
|
|
|
|
|
-/** Updates label:[serialization, reliable, metadata] pairs from offer. */
|
|
|
-ConnectionManager.prototype.update = function(updates) {
|
|
|
- var labels = Object.keys(updates);
|
|
|
- for (var i = 0, ii = labels.length; i < ii; i += 1) {
|
|
|
- var label = labels[i];
|
|
|
- this.labels[label] = updates[label];
|
|
|
- }
|
|
|
-};
|
|
|
+
|