From cc14b71fc999dd7505d14392206122875ec9b6f9 Mon Sep 17 00:00:00 2001 From: mahaifeng Date: Tue, 12 Nov 2024 12:18:28 +0800 Subject: [PATCH] =?UTF-8?q?[audio]=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BDslid?= =?UTF-8?q?er=20=E5=90=8E=E6=97=A0=E6=B3=95=E5=A4=8D=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-inner-audio-context.uvue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/API/create-inner-audio-context/create-inner-audio-context.uvue b/pages/API/create-inner-audio-context/create-inner-audio-context.uvue index 99188b5b..0eb3fa0f 100644 --- a/pages/API/create-inner-audio-context/create-inner-audio-context.uvue +++ b/pages/API/create-inner-audio-context/create-inner-audio-context.uvue @@ -5,7 +5,8 @@ - + 属性示例 @@ -42,7 +43,7 @@ - + @@ -130,7 +131,9 @@ }, onUnload() { if (this._audioContext != null && this.isPlaying) { - this.stop(); + if (this.isPlaying) { + this.stop(); + } this._audioContext!.destroy() } }, @@ -232,6 +235,7 @@ this.isPlaying = false; this.isPaused = true; this.isPlayEnd = true; + (this.$refs["slider"] as UniSliderElement).value = 0 }); }, onError() { -- GitLab