Modularize config.

pull/25/head
Pontus Persson 2017-12-08 15:28:32 +01:00 committed by Pontus Alexander
parent 8f411acee6
commit 80dc0a51d9
2 changed files with 8 additions and 7 deletions

6
client/config.js Normal file
View File

@ -0,0 +1,6 @@
export const peerConnectionConfig = {
'iceServers': [
{'urls': 'stun:stun.services.mozilla.com'},
{'urls': 'stun:stun.l.google.com:19302'},
],
};

View File

@ -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);