diff options
author | elioat <elioat@tilde.institute> | 2024-07-04 08:55:07 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-07-04 08:55:07 -0400 |
commit | 5d2993d7ad5b7a118421c2f783cfbeb1ab4aca00 (patch) | |
tree | 54eea023c2e987568b909ba1fcba747ab9ef26aa /js/pico-cam/pico-cam.js | |
parent | fdb2c861e4740a9158b27afec6353d659a9774d1 (diff) | |
download | tour-5d2993d7ad5b7a118421c2f783cfbeb1ab4aca00.tar.gz |
*
Diffstat (limited to 'js/pico-cam/pico-cam.js')
-rw-r--r-- | js/pico-cam/pico-cam.js | 8 |
1 files changed, 5 insertions, 3 deletions
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); }); }; |