Add missing vars to prevent auto-globals.

pull/25/head
Pontus Persson 2017-12-08 08:23:54 +01:00 committed by Pontus Alexander
parent 47246c19c9
commit b845607b7d
1 changed files with 4 additions and 2 deletions

View File

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