Skip to content

Commit

Permalink
Use ‘Cockpit’ in video file names if mission name is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Oct 24, 2023
1 parent 545779c commit a649758
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/mini-widgets/MiniVideoRecorder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ const startRecording = async (): Promise<SweetAlertResult | void> => {
mediaRecorder.value.onstop = () => {
const blob = new Blob(chunks, { type: 'video/webm' })
fixWebmDuration(blob, Date.now() - timeRecordingStart.value.getTime()).then((fixedBlob) => {
saveAs(fixedBlob, `${missionName} (${format(timeRecordingStart.value, 'LLL dd, yyyy - HH꞉mm꞉ss O')})`)
const fileName = `${missionName || 'Cockpit'} (${format(timeRecordingStart.value, 'LLL dd, yyyy - HH꞉mm꞉ss O')})`
saveAs(fixedBlob, fileName)
})
chunks = []
mediaRecorder.value = undefined
Expand Down

0 comments on commit a649758

Please sign in to comment.