From 1eadaf9d12e39ec4f8c244e5b6a79be9f1458614 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Tue, 21 Nov 2023 17:17:26 -0300 Subject: [PATCH] Generate video recording chunks every second This is needed so we can trigger the `ondataevailable` callback and use it to store periodic video backups. --- src/components/mini-widgets/MiniVideoRecorder.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mini-widgets/MiniVideoRecorder.vue b/src/components/mini-widgets/MiniVideoRecorder.vue index c49b237cb..4fdfceb17 100644 --- a/src/components/mini-widgets/MiniVideoRecorder.vue +++ b/src/components/mini-widgets/MiniVideoRecorder.vue @@ -185,7 +185,7 @@ const startRecording = async (): Promise => { timeRecordingStart.value = new Date() const fileName = `${missionName || 'Cockpit'} (${format(timeRecordingStart.value, 'LLL dd, yyyy - HH꞉mm꞉ss O')})` mediaRecorder.value = new MediaRecorder(mediaStream.value) - mediaRecorder.value.start() + mediaRecorder.value.start(1000) let chunks: Blob[] = [] mediaRecorder.value.ondataavailable = (e) => chunks.push(e.data)