diff --git a/src/components/Noise.vue b/src/components/Noise.vue index 1136d37..97aadfb 100644 --- a/src/components/Noise.vue +++ b/src/components/Noise.vue @@ -339,6 +339,7 @@ @@ -349,11 +350,17 @@ + + Cancel + - Stop + Stop and Save diff --git a/src/components/noise.js b/src/components/noise.js index ae80690..2aee06e 100644 --- a/src/components/noise.js +++ b/src/components/noise.js @@ -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()