From 709b8ac2b7a82a047edca7fbc5f3bc92b0f55c60 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Fri, 19 Sep 2014 17:20:27 +0200 Subject: SYWEB-13 SYWEB-14: disabled "Call" button if the browser does not support all required WebRTC features --- webclient/components/matrix/matrix-call.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webclient/components') 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) { -- cgit 1.4.1