const url = "wss://"+window.location.hostname+":"+window.location.port; let videoResolution = true; //Get our url const href = new URL (window.location.href); if (href.searchParams.has ("video")) switch (href.searchParams.get ("video").toLowerCase ()) { case "1080p": videoResolution = { width: {min: 1920, max: 1920}, height: {min: 1080, max: 1080}, }; break; case "720p": videoResolution = { width: {min: 1280, max: 1280}, height: {min: 720, max: 720}, }; break; case "576p": videoResolution = { width: {min: 720, max: 720}, height: {min: 576, max: 576}, }; break; case "480p": videoResolution = { width: {min: 640, max: 640}, height: {min: 480, max: 480}, }; break; case "no": videoResolution = false; break; } var opts = { lines: 12, // The number of lines to draw angle: 0.15, // The length of each line lineWidth: 0.44, // 0.44 The line thickness pointer: { length: 0.8, // 0.9 The radius of the inner circle strokeWidth: 0.035, // The rotation offset color: '#A0A0A0' // Fill color }, limitMax: true, colorStart: '#28c1d1', // Colors colorStop: '#28c1d1', // just experiment with them strokeColor: '#F0F0F0', // to see which ones work best for you generateGradient: false, gradientType: 0 }; var targets = document.querySelectorAll('.gaugeChart'); // your canvas element var gauges = []; for (var i=0;i