From 5d2993d7ad5b7a118421c2f783cfbeb1ab4aca00 Mon Sep 17 00:00:00 2001 From: elioat Date: Thu, 4 Jul 2024 08:55:07 -0400 Subject: * --- js/pico-cam/pico-cam.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js/pico-cam/pico-cam.js') diff --git a/js/pico-cam/pico-cam.js b/js/pico-cam/pico-cam.js index d2c06f3..31c1381 100644 --- a/js/pico-cam/pico-cam.js +++ b/js/pico-cam/pico-cam.js @@ -103,17 +103,19 @@ captureVideoButton.addEventListener('click', () => { reject(event.error); }; - // Set the desired frame rate + // Set the frame rate mediaRecorder.onstart = () => { const options = mediaRecorder.videoBitsPerSecond; mediaRecorder.videoBitsPerSecond = options * frameRate; }; - // console.log('Starting recording...'); mediaRecorder.start(); + captureVideoButton.disabled = true; + captureVideoButton.textContent = 'Recording...'; setTimeout(() => { - // console.log('Stopping recording...'); mediaRecorder.stop(); + captureVideoButton.disabled = false; + captureVideoButton.textContent = 'Capture Video'; }, duration); }); }; -- cgit 1.4.1-2-gfad0