about summary refs log tree commit diff stats
path: root/js/pico-cam/pico-cam.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/pico-cam/pico-cam.js')
-rw-r--r--js/pico-cam/pico-cam.js8
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);
         });
     };