From 967df3cb7ec1751bc184df2e53c04739803b8162 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Wed, 12 Jul 2023 18:24:16 +0800 Subject: [PATCH] chore: update --- src/views/able/wavesurfer/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/able/wavesurfer/index.vue b/src/views/able/wavesurfer/index.vue index e26a2db43..420849fb8 100644 --- a/src/views/able/wavesurfer/index.vue +++ b/src/views/able/wavesurfer/index.vue @@ -23,6 +23,9 @@ const curTime = ref(); // 音频是否正在播放 const isPlay = ref(false); +const { VITE_PUBLIC_PATH } = import.meta.env; +const url = `${VITE_PUBLIC_PATH}audio/海阔天空.mp3`; + function init() { wavesurfer.value = WaveSurfer.create({ container: wavesurferRef.value, @@ -32,7 +35,7 @@ function init() { cursorColor: "rgb(64, 158, 255)", cursorWidth: 4, // backend: "MediaElement", - url: "/audio/海阔天空.mp3" + url }); // 音频被解码后触发