diff --git a/src/camera.js b/src/camera.js index e56f9e7..4638b2e 100644 --- a/src/camera.js +++ b/src/camera.js @@ -14,15 +14,16 @@ class Camera { * @param {Integer} loadingImgId * @param {Integer} failedImgId */ - constructor(parent, cameraLink, loadingImgId, failedImgId) { + + constructor(parent, cameraLink) { if (parent != null){ this.container = parent.querySelector('.stream'); this.crosshair = parent.querySelector('.crosshair'); } this.stream = cameraLink + '/stream.mjpg'; this.testPage = cameraLink + '/settings.json'; - this.loadingImg = loadingImgId; - this.failedImg = failedImgId; + this.loadingImg = '../images/spinner.svg'; + this.failedImg = '../images/error.svg'; this.cameraConnected = false; if (cameraLink == 'http://10.14.18.11:5801'){ diff --git a/src/connections.js b/src/connections.js index 20487cf..99cde96 100644 --- a/src/connections.js +++ b/src/connections.js @@ -25,9 +25,9 @@ const cameraLink2 = 'http://10.14.18.2:1182'; const limelightLink = 'http://10.14.18.11:5801'; const cameras = [ - new Camera(document.getElementById('camera1'), cameraLink1, '../images/spinner.svg', '../images/error.svg'), - new Camera(document.getElementById('camera2'), cameraLink2, '../images/spinner.svg', '../images/error.svg'), - new Camera(null, limelightLink, '../images/spinner.svg', '../images/error.svg') + new Camera(document.getElementById('camera1'), cameraLink1), + new Camera(document.getElementById('camera2'), cameraLink2), + new Camera(null, limelightLink) ]; let initialLoad = true;