Resolve "press+hold audio recording is broken"

This commit is contained in:
N Pex 2023-10-25 20:59:56 +00:00
parent 4bc4a8d8e5
commit 758201e2eb
4 changed files with 27 additions and 7 deletions

View file

@ -113,12 +113,12 @@
{{ recordingTime }}
</div>
</v-col>
<v-col cols="3">
<v-col cols="3" class="pa-0">
<v-btn id="btn-record-cancel" @click.stop="cancelRecording" text class="swipe-info">{{
$t("menu.cancel")
}}</v-btn>
</v-col>
<v-col cols="3">
<v-col cols="3" class="pa-0">
<v-btn id="btn-record-stop" @click.stop="stopRecording" icon class="swipe-info"
><v-icon color="white">stop</v-icon></v-btn
>
@ -328,7 +328,9 @@ export default {
this.$emit("close");
this.previewPlayer = null;
this.recordedFile = null;
this.$refs.audio_import.value = null;
if (this.$refs.audio_import) {
this.$refs.audio_import.value = null;
}
},
mouseUp(ignoredEvent) {
document.removeEventListener("mouseup", this.mouseUp, false);
@ -459,8 +461,12 @@ export default {
},
send() {
this.$emit("file", { file: this.recordedFile });
this.previewPlayer.pause();
this.$refs.audio_import.value = null;
if (this.previewPlayer) {
this.previewPlayer.pause();
}
if (this.$refs.audio_import) {
this.$refs.audio_import.value = null;
}
},
getFile(send) {
const duration = Date.now() - this.recordStartedAt;