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 @@ @@ -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
modification, are permitted provided that the following conditions are
@ -38,7 +38,7 @@ var webrtcDetectedBrowser = null; @@ -38,7 +38,7 @@ var webrtcDetectedBrowser = null;
var webrtcDetectedVersion = null;
function maybeFixConfiguration(pcConfig) {
if (pcConfig == null) {
if (!pcConfig) {
return;
}
for (var i = 0; i < pcConfig.iceServers.length; i++) {
@ -148,8 +148,14 @@ if (navigator.mozGetUserMedia) { @@ -148,8 +148,14 @@ if (navigator.mozGetUserMedia) {
console.log("This appears to be Chrome");
webrtcDetectedBrowser = "chrome";
webrtcDetectedVersion =
parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
// Temporary fix until crbug/374263 is fixed.
// 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.
createIceServer = function(url, username, password) {

Loading…
Cancel
Save