Add missing vars to prevent auto-globals.

pull/22/head
Pontus Persson 2017-12-08 08:23:54 +01:00
parent 4f4c071693
commit a96b36e5fa
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
var localVideo; var localVideo;
var localStream;
var remoteVideo; var remoteVideo;
var peerConnection; var peerConnection;
var uuid; var uuid;
var serverConnection;
var peerConnectionConfig = { var peerConnectionConfig = {
'iceServers': [ 'iceServers': [
@ -11,7 +13,7 @@ var peerConnectionConfig = {
}; };
function pageReady() { function pageReady() {
uuid = uuid(); uuid = createUUID();
localVideo = document.getElementById('localVideo'); localVideo = document.getElementById('localVideo');
remoteVideo = document.getElementById('remoteVideo'); remoteVideo = document.getElementById('remoteVideo');
@ -92,7 +94,7 @@ function errorHandler(error) {
// Taken from http://stackoverflow.com/a/105074/515584 // Taken from http://stackoverflow.com/a/105074/515584
// Strictly speaking, it's not a real UUID, but it gets the job done here // Strictly speaking, it's not a real UUID, but it gets the job done here
function uuid() { function createUUID() {
function s4() { function s4() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
} }