Explorar el Código

播放状态问题

skyblued hace 2 años
padre
commit
f387a5208c
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7 3
      src/subpages/colexiu/uses/use-app.ts

+ 7 - 3
src/subpages/colexiu/uses/use-app.ts

@@ -49,11 +49,15 @@ export const useMp3s = async (detail: MusicSheelDetail) => {
   const search = useOriginSearch()
   const partIndex = ((search['part-index'] as string) || 0) as unknown as number
   const activebg = detail.background?.[partIndex]
+
+  // 伴奏
+  const backgroundSong = encodeURI(detail.audioFileUrl || detail.metronomeUrl || detail.url || '')
+  // 原音
+  const musicSong = encodeURI(activebg?.audioFileUrl || activebg?.metronomeUrl || '')
   // 兼容未修改之前
   runtime.songs = {
-    background: encodeURI(detail.audioFileUrl || detail.metronomeUrl || detail.url || ''),
-    music: encodeURI(activebg?.audioFileUrl || activebg?.metronomeUrl || ''),
-    // music: '/m1.mp3'
+    background: backgroundSong ? backgroundSong + '?t=background' : '',
+    music: musicSong ? musicSong + '?t=music' : '',
   }
   // console.log('backgroundUrl', runtime.songs.background)
   // console.log('musicUrl', runtime.songs.music)