summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-19 17:20:27 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-19 17:20:33 +0200
commit709b8ac2b7a82a047edca7fbc5f3bc92b0f55c60 (patch)
tree6dfd0477994e7d6694113e8964e01ab979c4f70a /webclient/components
parentSYWEB-13: disabled "Send image" button if the browser does not support HTML5 ... (diff)
downloadsynapse-709b8ac2b7a82a047edca7fbc5f3bc92b0f55c60.tar.xz
SYWEB-13 SYWEB-14: disabled "Call" button if the browser does not support all required WebRTC features
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-call.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js
index 2ecb8b05ff..1d377d6601 100644
--- a/webclient/components/matrix/matrix-call.js
+++ b/webclient/components/matrix/matrix-call.js
@@ -40,6 +40,11 @@ window.RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConne
 window.RTCSessionDescription = window.RTCSessionDescription || window.webkitRTCSessionDescription || window.mozRTCSessionDescription;
 window.RTCIceCandidate = window.RTCIceCandidate || window.webkitRTCIceCandidate || window.mozRTCIceCandidate;
 
+// Returns true if the browser supports all required features to make WebRTC call
+var isWebRTCSupported = function () {
+    return (navigator.getUserMedia || window.RTCPeerConnection || window.RTCSessionDescription || window.RTCIceCandidate);
+};
+
 angular.module('MatrixCall', [])
 .factory('MatrixCall', ['matrixService', 'matrixPhoneService', '$rootScope', '$timeout', function MatrixCallFactory(matrixService, matrixPhoneService, $rootScope, $timeout) {
     var MatrixCall = function(room_id) {