Updated demos to use the sucess and failure callback in addIceCandidate api.
R=dutton@google.com Review URL: https://webrtc-codereview.appspot.com/7969004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5497 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -86,13 +86,15 @@ function connect() {
|
||||
pc1.onicecandidate = function(e) {
|
||||
log('Candidate PC1');
|
||||
if (e.candidate) {
|
||||
pc2.addIceCandidate(new RTCIceCandidate(e.candidate));
|
||||
pc2.addIceCandidate(new RTCIceCandidate(e.candidate),
|
||||
onAddIceCandidateSuccess, onAddIceCandidateError);
|
||||
}
|
||||
}
|
||||
pc2.onicecandidate = function(e) {
|
||||
log('Candidate PC2');
|
||||
if (e.candidate) {
|
||||
pc1.addIceCandidate(new RTCIceCandidate(e.candidate));
|
||||
pc1.addIceCandidate(new RTCIceCandidate(e.candidate),
|
||||
onAddIceCandidateSuccess, onAddIceCandidateError);
|
||||
}
|
||||
}
|
||||
pc2.onaddstream = function(e) {
|
||||
@@ -112,6 +114,14 @@ function connect() {
|
||||
});
|
||||
}
|
||||
|
||||
function onAddIceCandidateSuccess() {
|
||||
trace("AddIceCandidate success.");
|
||||
}
|
||||
|
||||
function onAddIceCandidateError(error) {
|
||||
trace("Failed to add Ice Candidate: " + error.toString());
|
||||
}
|
||||
|
||||
// Augumentation of stats entries with utility functions.
|
||||
// The augumented entry does what the stats entry does, but adds
|
||||
// utility functions.
|
||||
|
Reference in New Issue
Block a user