Add recording function improvements

This commit is contained in:
Kevin Thomas
2022-04-30 21:07:41 -07:00
parent c485b0a786
commit 8ad174b0af
2 changed files with 19 additions and 1 deletions

View File

@@ -339,6 +339,7 @@
<v-dialog
v-model="recordingDialog"
max-width="600px"
persistent="true"
>
<v-card>
<v-card-title>
@@ -349,11 +350,17 @@
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
text
@click="cancelRecording"
>
Cancel
</v-btn>
<v-btn
text
@click="stopRecording"
>
Stop
Stop and Save
</v-btn>
</v-card-actions>
</v-card>

View File

@@ -727,6 +727,7 @@ export default {
async stopRecording () {
const recording = await this.recorder.stop()
// Set active profile back to the selected one
this.loadProfile()
const url = URL.createObjectURL(recording)
@@ -735,6 +736,16 @@ export default {
anchor.href = url
anchor.click()
clearInterval(this.recordingInterval)
this.recordingDialog = false
this.stop()
},
async cancelRecording () {
await this.recorder.stop()
// Set active profile back to the selected one
this.loadProfile()
clearInterval(this.recordingInterval)
this.recordingDialog = false
this.stop()