Skip to content

Commit

Permalink
Update adapter.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Bezruk committed Sep 7, 2015
1 parent a46d99d commit 9963f65
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,16 @@ if (typeof window === 'undefined' || !window.navigator) {
webrtcUtils.log('This appears to be Chrome');

webrtcDetectedBrowser = 'chrome';

var chromeAgentMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);

if (chromeAgentMatch && chromeAgentMatch.length && chromeAgentMatch[2]) {
// the detected chrome version.
webrtcDetectedVersion = parseInt(chromeAgentMatch[2], 10);
} else {
webrtcDetectedVersion = 1;
}

// the detected chrome version.
webrtcDetectedVersion =
parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);

// the minimum chrome version still supported by adapter.
webrtcMinimumVersion = 38;
Expand Down

0 comments on commit 9963f65

Please sign in to comment.