Permalink
Browse files

WebRTC answer after setRemoteDescription.

  • Loading branch information...
1 parent 8ce56ee commit 79a1a3aae20383b84f0ee3b124f710b664815f76 @marcolanaro committed Jan 12, 2014
Showing with 6 additions and 4 deletions.
  1. +3 −2 client/datachannel.io.js
  2. +3 −2 client/datachannel.io_DEP.js
View
@@ -89,8 +89,9 @@ var DataChannel = (function(window){
Extend(event.channel, _channel);
channels[id].dc = event.channel;
};
- channels[id].pc.setRemoteDescription(new RTCSessionDescription(data.description));
- _create('answer', id);
+ channels[id].pc.setRemoteDescription(new RTCSessionDescription(data.description), function() {
+ _create('answer', id);
+ });
} catch (e) {_noWebRTC(id)}
}
@@ -3963,8 +3963,9 @@ var DataChannel = (function(window){
Extend(event.channel, _channel);
channels[id].dc = event.channel;
};
- channels[id].pc.setRemoteDescription(new RTCSessionDescription(data.description));
- _create('answer', id);
+ channels[id].pc.setRemoteDescription(new RTCSessionDescription(data.description), function() {
+ _create('answer', id);
+ });
} catch (e) {_noWebRTC(id)}
}

0 comments on commit 79a1a3a

Please sign in to comment.