SYWEB-13 SYWEB-14: disabled "Call" button if the browser does not support all required WebRTC features

This commit is contained in:
Emmanuel ROHEE 2014-09-19 17:20:27 +02:00
parent e9670fd144
commit 709b8ac2b7
3 changed files with 14 additions and 2 deletions

View file

@ -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) {