Skip to content

Commit

Permalink
Generate video recording chunks every second
Browse files Browse the repository at this point in the history
This is needed so we can trigger the `ondataevailable` callback and use it to store periodic video backups.
  • Loading branch information
rafaellehmkuhl committed Nov 21, 2023
1 parent 169424c commit 0904bc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/mini-widgets/MiniVideoRecorder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const startRecording = async (): Promise<SweetAlertResult | void> => {
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)
Expand Down

0 comments on commit 0904bc8

Please sign in to comment.