st countdown = function () {
				seconds -= 1;
				timer.textContent = seconds;
				if (seconds === 0) {
					takePhoto();
					window.clearInterval(interval);
					timer.remove();
					captureEl.disabled = false;
				}
			}
			interval = window.setInterval(countdown, 1000);
		});

		window.onresize = () => {
			smallestWindowDimension = Math.min(window.innerWidth, window.innerHeight);
			resizeOutput();
		}

		function takePhoto() {
			const outputSize = 600;
			const img = new Image();

			img.onload = fu