diff options
author | David Baker <dbkr@matrix.org> | 2014-09-12 18:16:24 +0100 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-09-12 18:19:19 +0100 |
commit | 842898df159f9e3c59570d9ba7dc127f26b682b8 (patch) | |
tree | 3bd4417d63f79a8366a47116658d77ed110b25a6 /webclient/components/matrix/matrix-phone-service.js | |
parent | Fix bug where we relied on the current_state_events being updated when we are... (diff) | |
download | synapse-842898df159f9e3c59570d9ba7dc127f26b682b8.tar.xz |
Send multiple candidates at once instead of all individually. Changes spec to include multiple candidates in a candidate(s) message.
Diffstat (limited to '')
-rw-r--r-- | webclient/components/matrix/matrix-phone-service.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webclient/components/matrix/matrix-phone-service.js b/webclient/components/matrix/matrix-phone-service.js index b0dcf19100..2d0732a8da 100644 --- a/webclient/components/matrix/matrix-phone-service.js +++ b/webclient/components/matrix/matrix-phone-service.js @@ -77,13 +77,15 @@ angular.module('matrixPhoneService', []) return; } call.receivedAnswer(msg); - } else if (event.type == 'm.call.candidate') { + } else if (event.type == 'm.call.candidates') { var call = matrixPhoneService.allCalls[msg.call_id]; if (!call) { - console.log("Got candidate for unknown call ID "+msg.call_id); + console.log("Got candidates for unknown call ID "+msg.call_id); return; } - call.gotRemoteIceCandidate(msg.candidate); + for (var i = 0; i < msg.candidates.length; ++i) { + call.gotRemoteIceCandidate(msg.candidates[i]); + } } else if (event.type == 'm.call.hangup') { var call = matrixPhoneService.allCalls[msg.call_id]; if (!call) { |