summary refs log tree commit diff
path: root/webclient/components/matrix/matrix-phone-service.js
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-19 18:22:14 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-19 18:22:14 +0100
commit648fd2a622353ecdb94eb0244c4dc8b6676d8a89 (patch)
tree27172581b2644f0f76315a6d07cf5d4e24843873 /webclient/components/matrix/matrix-phone-service.js
parentMove video background element up as it was causing the page to scroll. (diff)
downloadsynapse-648fd2a622353ecdb94eb0244c4dc8b6676d8a89.tar.xz
Notify a callee that their browser doesn't support VoIP too.
SYWEB-14 #resolved
Diffstat (limited to '')
-rw-r--r--webclient/components/matrix/matrix-phone-service.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-phone-service.js b/webclient/components/matrix/matrix-phone-service.js

index d05eecf72a..9d0b84fb23 100644 --- a/webclient/components/matrix/matrix-phone-service.js +++ b/webclient/components/matrix/matrix-phone-service.js
@@ -59,6 +59,16 @@ angular.module('matrixPhoneService', []) var MatrixCall = $injector.get('MatrixCall'); var call = new MatrixCall(event.room_id); + + if (!isWebRTCSupported()) { + console.log("Incoming call ID "+msg.call_id+" but this browser doesn't support WebRTC"); + // don't hang up the call: there could be other clients connected that do support WebRTC and declining the + // the call on their behalf would be really annoying. + // instead, we broadcast a fake call event with a non-functional call object + $rootScope.$broadcast(matrixPhoneService.INCOMING_CALL_EVENT, call); + return; + } + call.call_id = msg.call_id; call.initWithInvite(event); matrixPhoneService.allCalls[call.call_id] = call;