summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js3
-rw-r--r--webclient/room/room.html8
2 files changed, 9 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index ac8f767d16..f8dcec2b42 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -33,7 +33,8 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         paginating: false, // used to avoid concurrent pagination requests pulling in dup contents
         stream_failure: undefined, // the response when the stream fails
         waiting_for_joined_event: false,  // true when the join request is pending. Back to false once the corresponding m.room.member event is received
-        messages_visibility: "hidden" // In order to avoid flickering when scrolling down the message table at the page opening, delay the message table display
+        messages_visibility: "hidden", // In order to avoid flickering when scrolling down the message table at the page opening, delay the message table display
+        webRTCSupported: isWebRTCSupported() // true if the browser does not support WebRTC
     };
     $scope.members = {};
     $scope.autoCompleting = false;
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 44a0e34d9f..1fe83c03ea 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -176,7 +176,13 @@
                         <button ng-click="inviteUser()" ng-disabled="state.permission_denied">Invite</button>
                 </span>
                 <button ng-click="leaveRoom()" ng-disabled="state.permission_denied">Leave</button>
-                <button ng-click="startVoiceCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2" ng-disabled="state.permission_denied">Voice Call</button>
+                <button ng-click="startVoiceCall()"
+                        ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2"
+                        ng-disabled="state.permission_denied || !state.webRTCSupported"
+                        title ="{{ state.webRTCNotSupported ? '' : 'VoIP requires webRTC but your browser does not support it.'}}"
+                        >
+                    Voice Call
+                </button>
             </div>
         
             {{ feedback }}