|
@@ -65,9 +65,6 @@ export default defineComponent({
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const isScreenScroll = ref(false)
|
|
|
- const lottieDom = ref()
|
|
|
- const lottieDom1 = ref()
|
|
|
- const lottieDom2 = ref()
|
|
|
const mStickyBottom = ref()
|
|
|
const mStickyUpward = ref()
|
|
|
const state = reactive({
|
|
@@ -205,15 +202,9 @@ export default defineComponent({
|
|
|
const canvasDom = document.querySelector("#audioVisualizer") as HTMLCanvasElement
|
|
|
const { pauseVisualDraw, playVisualDraw } = audioVisualDraw(audioDom, canvasDom)
|
|
|
player.on('play', () => {
|
|
|
- lottieDom.value?.play()
|
|
|
- lottieDom1.value?.play()
|
|
|
- lottieDom2.value?.play()
|
|
|
playVisualDraw()
|
|
|
});
|
|
|
player.on('pause', () => {
|
|
|
- lottieDom.value?.pause()
|
|
|
- lottieDom1.value?.pause()
|
|
|
- lottieDom2.value?.pause()
|
|
|
pauseVisualDraw()
|
|
|
});
|
|
|
}
|
|
@@ -359,6 +350,9 @@ export default defineComponent({
|
|
|
}
|
|
|
const pauseVisualDraw = () => {
|
|
|
isPause = true
|
|
|
+ requestAnimationFrame(()=>{
|
|
|
+ canvasCtx.clearRect(0, 0, width, height);
|
|
|
+ })
|
|
|
//audioCtx?.suspend() // 暂停 加了暂停和恢复音频音质发生了变化 所以这里取消了
|
|
|
// source?.disconnect()
|
|
|
// analyser?.disconnect()
|
|
@@ -517,7 +511,6 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
- setStatusBarTextColor(false)
|
|
|
cleanScrollEvent()
|
|
|
state._plrl?.destroy()
|
|
|
});
|
|
@@ -553,6 +546,7 @@ export default defineComponent({
|
|
|
title={state.musicDetail?.musicSheetName}
|
|
|
border={false}
|
|
|
isBack={route.query.platformType != 'ANALYSIS'}
|
|
|
+ onLeftClick={()=>{ setStatusBarTextColor(false) }}
|
|
|
/>
|
|
|
</MSticky>
|
|
|
<div class={styles.singer}>
|
|
@@ -564,9 +558,9 @@ export default defineComponent({
|
|
|
state.playType === 'Audio' &&
|
|
|
<div class={styles.audioBox}>
|
|
|
<canvas class={styles.audioVisualizer} id="audioVisualizer"></canvas>
|
|
|
- <Vue3Lottie ref={lottieDom} class={styles.audioBga} animationData={audioBga} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
- <Vue3Lottie ref={lottieDom1} class={styles.audioBga1} animationData={audioBga1} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
- <Vue3Lottie ref={lottieDom2} class={styles.audioBga2} animationData={audioBga2} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
+ <Vue3Lottie class={styles.audioBga} animationData={audioBga} autoPlay={true} loop={true}></Vue3Lottie>
|
|
|
+ <Vue3Lottie class={styles.audioBga1} animationData={audioBga1} autoPlay={true} loop={true}></Vue3Lottie>
|
|
|
+ <Vue3Lottie class={styles.audioBga2} animationData={audioBga2} autoPlay={true} loop={true}></Vue3Lottie>
|
|
|
<audio
|
|
|
crossorigin="anonymous"
|
|
|
id="audioMediaSrc"
|
|
@@ -589,14 +583,16 @@ export default defineComponent({
|
|
|
playsinline
|
|
|
/>
|
|
|
}
|
|
|
- <div class={[styles.playLarge, plyrState.playIngShow && styles.playIngShow]}></div>
|
|
|
- <div class={styles.mediaTime}>
|
|
|
- <div>
|
|
|
- {getSecondRPM(plyrState.currentTime)}
|
|
|
- </div>
|
|
|
- <div class={styles.note}>/</div>
|
|
|
- <div class={styles.duration}>
|
|
|
- {getSecondRPM(plyrState.duration)}
|
|
|
+ <div class={[styles.playLarge, !plyrState.mediaTimeShow && plyrState.playIngShow && styles.playIngShow]}></div>
|
|
|
+ <div class={styles.mediaTimeCon}>
|
|
|
+ <div class={styles.mediaTime}>
|
|
|
+ <div>
|
|
|
+ {getSecondRPM(plyrState.currentTime)}
|
|
|
+ </div>
|
|
|
+ <div class={styles.note}>/</div>
|
|
|
+ <div class={styles.duration}>
|
|
|
+ {getSecondRPM(plyrState.duration)}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.landscapeScreen} onClick={handlerLandscapeScreen}></div>
|