From b845607b7d240e0ea47f1cc0bd266242eed1df2d Mon Sep 17 00:00:00 2001 From: Pontus Persson Date: Fri, 8 Dec 2017 08:23:54 +0100 Subject: [PATCH] Add missing vars to prevent auto-globals. --- client/webrtc.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/webrtc.js b/client/webrtc.js index ab1ce39..3a9ad24 100755 --- a/client/webrtc.js +++ b/client/webrtc.js @@ -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); }