Simon Eisenmann 11 years ago
parent
commit
006a161dd2
  1. 14
      static/js/libs/webrtc.adapter.js

14
static/js/libs/webrtc.adapter.js

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2011, The WebRTC project authors. All rights reserved. Copyright (c) 2014, The WebRTC project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
@ -38,7 +38,7 @@ var webrtcDetectedBrowser = null;
var webrtcDetectedVersion = null; var webrtcDetectedVersion = null;
function maybeFixConfiguration(pcConfig) { function maybeFixConfiguration(pcConfig) {
if (pcConfig == null) { if (!pcConfig) {
return; return;
} }
for (var i = 0; i < pcConfig.iceServers.length; i++) { for (var i = 0; i < pcConfig.iceServers.length; i++) {
@ -148,8 +148,14 @@ if (navigator.mozGetUserMedia) {
console.log("This appears to be Chrome"); console.log("This appears to be Chrome");
webrtcDetectedBrowser = "chrome"; webrtcDetectedBrowser = "chrome";
webrtcDetectedVersion = // Temporary fix until crbug/374263 is fixed.
parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10); // Setting Chrome version to 999, if version is unavailable.
var result = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
if (result !== null) {
webrtcDetectedVersion = parseInt(result[2], 10);
} else {
webrtcDetectedVersion = 999;
}
// Creates iceServer from the url for Chrome M33 and earlier. // Creates iceServer from the url for Chrome M33 and earlier.
createIceServer = function(url, username, password) { createIceServer = function(url, username, password) {

Loading…
Cancel
Save