diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-19 17:20:27 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-19 17:20:33 +0200 |
commit | 709b8ac2b7a82a047edca7fbc5f3bc92b0f55c60 (patch) | |
tree | 6dfd0477994e7d6694113e8964e01ab979c4f70a /webclient/components | |
parent | SYWEB-13: disabled "Send image" button if the browser does not support HTML5 ... (diff) | |
download | synapse-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.js | 5 |
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) { |