Merge remote-tracking branch 'upsuper/master' into gh-pages
Conflicts: README.md
This commit is contained in:
commit
d0b47fcfe9
2 changed files with 16 additions and 18 deletions
13
README.md
13
README.md
|
@ -21,6 +21,7 @@ function getIPs(callback){
|
|||
var RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
var useWebKit = !!window.webkitRTCPeerConnection;
|
||||
|
||||
//bypass naive webrtc blocking
|
||||
if(!RTCPeerConnection){
|
||||
|
@ -30,12 +31,10 @@ function getIPs(callback){
|
|||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
var win = iframe.contentWindow;
|
||||
window.RTCPeerConnection = win.RTCPeerConnection;
|
||||
window.mozRTCPeerConnection = win.mozRTCPeerConnection;
|
||||
window.webkitRTCPeerConnection = win.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = win.RTCPeerConnection
|
||||
|| win.mozRTCPeerConnection
|
||||
|| win.webkitRTCPeerConnection;
|
||||
useWebKit = !!win.webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
//minimal requirements for data connection
|
||||
|
@ -49,7 +48,7 @@ function getIPs(callback){
|
|||
var servers = undefined;
|
||||
|
||||
//add same stun server for chrome
|
||||
if(window.webkitRTCPeerConnection)
|
||||
if(useWebKit)
|
||||
servers = {iceServers: [{urls: "stun:stun.services.mozilla.com"}]};
|
||||
|
||||
//construct a new RTCPeerConnection
|
||||
|
|
13
index.html
13
index.html
|
@ -28,6 +28,7 @@
|
|||
var RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
var useWebKit = !!window.webkitRTCPeerConnection;
|
||||
|
||||
//bypass naive webrtc blocking
|
||||
if(!RTCPeerConnection){
|
||||
|
@ -37,12 +38,10 @@
|
|||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
var win = iframe.contentWindow;
|
||||
window.RTCPeerConnection = win.RTCPeerConnection;
|
||||
window.mozRTCPeerConnection = win.mozRTCPeerConnection;
|
||||
window.webkitRTCPeerConnection = win.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = window.RTCPeerConnection
|
||||
|| window.mozRTCPeerConnection
|
||||
|| window.webkitRTCPeerConnection;
|
||||
RTCPeerConnection = win.RTCPeerConnection
|
||||
|| win.mozRTCPeerConnection
|
||||
|| win.webkitRTCPeerConnection;
|
||||
useWebKit = !!win.webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
//minimal requirements for data connection
|
||||
|
@ -56,7 +55,7 @@
|
|||
var servers = undefined;
|
||||
|
||||
//add same stun server for chrome
|
||||
if(window.webkitRTCPeerConnection)
|
||||
if(useWebKit)
|
||||
servers = {iceServers: [{urls: "stun:stun.services.mozilla.com"}]};
|
||||
|
||||
//construct a new RTCPeerConnection
|
||||
|
|
Loading…
Reference in a new issue