Modularize config.
parent
8f411acee6
commit
80dc0a51d9
|
|
@ -0,0 +1,6 @@
|
||||||
|
export const peerConnectionConfig = {
|
||||||
|
'iceServers': [
|
||||||
|
{'urls': 'stun:stun.services.mozilla.com'},
|
||||||
|
{'urls': 'stun:stun.l.google.com:19302'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { peerConnectionConfig } from './config.js';
|
||||||
|
|
||||||
var localVideo;
|
var localVideo;
|
||||||
var localStream;
|
var localStream;
|
||||||
var remoteVideo;
|
var remoteVideo;
|
||||||
|
|
@ -11,13 +13,6 @@ var dataChannelOptions = {
|
||||||
maxRetransmitTime: 500, // in milliseconds
|
maxRetransmitTime: 500, // in milliseconds
|
||||||
};
|
};
|
||||||
|
|
||||||
var peerConnectionConfig = {
|
|
||||||
'iceServers': [
|
|
||||||
{'urls': 'stun:stun.services.mozilla.com'},
|
|
||||||
{'urls': 'stun:stun.l.google.com:19302'},
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
function pageReady() {
|
function pageReady() {
|
||||||
document.querySelector("button#start")
|
document.querySelector("button#start")
|
||||||
.addEventListener("click", start);
|
.addEventListener("click", start);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue