Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function detectBrowser(window) {
var result = webrtcUtils.detectBrowser(window);
if (/*@cc_on!@*/false || !!document.documentMode) {
var hasMatch = /\brv[ :]+(\d+)/g.exec(navigator.userAgent) || [];
result.browser = 'IE';
result.version = parseInt(hasMatch[1], 10);
// window.webrtcDetectedBrowser = 'IE';
// window.webrtcDetectedVersion = parseInt(hasMatch[1], 10);
// window.webrtcMinimumVersion = 9;
// window.webrtcDetectedType = 'plugin';
// window.webrtcDetectedDCSupport = 'SCTP';
if (!result.version) {
hasMatch = /\bMSIE[ :]+(\d+)/g.exec(navigator.userAgent) || [];
result.version = parseInt(hasMatch[1] || '0', 10);