|
@@ -54,8 +54,6 @@ import "plyr/dist/plyr.css";
|
|
|
import Plyr from "plyr";
|
|
|
import { Vue3Lottie } from "vue3-lottie";
|
|
|
import audioBga from "./images/audioBga.json";
|
|
|
-import audioBga1 from "./images/leftCloud.json";
|
|
|
-import audioBga2 from "./images/rightCloud.json";
|
|
|
import videobg from "./images/videobg.png";
|
|
|
//import playProgressData from "./playCreation/playProgress"
|
|
|
import Loading from './loading';
|
|
@@ -71,6 +69,7 @@ export default defineComponent({
|
|
|
const isScreenScroll = ref(false)
|
|
|
const mStickyBottom = ref()
|
|
|
const mStickyUpward = ref()
|
|
|
+ const playBoxDom = ref()
|
|
|
const state = reactive({
|
|
|
id: route.query.id,
|
|
|
deleteStatus: false,
|
|
@@ -89,6 +88,7 @@ export default defineComponent({
|
|
|
rows: 20
|
|
|
},
|
|
|
_plrl: null as any,
|
|
|
+ heightA:0,
|
|
|
heightV:0,
|
|
|
heightB:0
|
|
|
});
|
|
@@ -365,7 +365,7 @@ export default defineComponent({
|
|
|
canvWidth: width,
|
|
|
canvHeight: height,
|
|
|
canvFillColor: "transparent",
|
|
|
- lineColor: "rgba(255, 255, 255, 0.7)"
|
|
|
+ lineColor: "rgba(28,172,241, 0.58)"
|
|
|
})
|
|
|
}, 300);
|
|
|
}
|
|
@@ -443,7 +443,7 @@ export default defineComponent({
|
|
|
// 初始化五线谱
|
|
|
function initStaff(){
|
|
|
const src = `${vaildMusicScoreUrl()}/instrument/#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=${staffState.musicRenderType}&part-index=${staffState.partIndex}`;
|
|
|
- //const src = `http://192.168.3.122:3000/instrument.html#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=${staffState.musicRenderType}&part-index=${staffState.partIndex}`;
|
|
|
+ //const src = `http://192.168.0.148:3000/instrument.html#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=${staffState.musicRenderType}&part-index=${staffState.partIndex}`;
|
|
|
staffState.staffSrc = src
|
|
|
window.addEventListener('message', (event) => {
|
|
|
const { api, height } = event.data;
|
|
@@ -520,6 +520,7 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
+ state.heightA = playBoxDom.value.offsetHeight
|
|
|
setStatusBarTextColor(true)
|
|
|
try {
|
|
|
const res = await api_userMusicDetail(state.id);
|
|
@@ -586,6 +587,7 @@ export default defineComponent({
|
|
|
<div
|
|
|
style={
|
|
|
{
|
|
|
+ '--heightA': state.heightA + 'px',
|
|
|
'--barheight':state.heightV + "px"
|
|
|
}
|
|
|
}
|
|
@@ -614,89 +616,89 @@ export default defineComponent({
|
|
|
演奏:{state.musicDetail?.username}
|
|
|
</div>
|
|
|
<Sticky zIndex={1000} offsetTop={state.heightV - 1 + "px"}>
|
|
|
- <div data-html2canvas-ignore="true" class={[styles.playSection, plyrState.mediaTimeShow && styles.mediaTimeShow, isLandscapeScreen.value&&styles.isLandscapeScreen]} id="playMediaSection" onClick={handlerClickPlay}>
|
|
|
- {
|
|
|
- isLandscapeScreen.value &&
|
|
|
- <div class={styles.backBox}>
|
|
|
- <img class={styles.backImg} src={backImg} onClick={handlerBack}/>
|
|
|
- <div class={styles.musicDetail}>
|
|
|
- <div class={styles.musicSheetName}>
|
|
|
- <NoticeBar
|
|
|
- text={state.musicDetail?.musicSheetName}
|
|
|
- background="none"
|
|
|
- />
|
|
|
+ <div class={styles.playBox} ref={playBoxDom}>
|
|
|
+ <div data-html2canvas-ignore="true" class={[styles.playSection, plyrState.mediaTimeShow && styles.mediaTimeShow, isLandscapeScreen.value&&styles.isLandscapeScreen,state.playType === 'Video' && styles.videoType]} id="playMediaSection" onClick={handlerClickPlay}>
|
|
|
+ {
|
|
|
+ isLandscapeScreen.value &&
|
|
|
+ <div class={styles.backBox}>
|
|
|
+ <img class={styles.backImg} src={backImg} onClick={handlerBack}/>
|
|
|
+ <div class={styles.musicDetail}>
|
|
|
+ <div class={styles.musicSheetName}>
|
|
|
+ <NoticeBar
|
|
|
+ text={state.musicDetail?.musicSheetName}
|
|
|
+ background="none"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class={styles.username}>演奏:{state.musicDetail?.username}</div>
|
|
|
</div>
|
|
|
- <div class={styles.username}>演奏:{state.musicDetail?.username}</div>
|
|
|
</div>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ state.playType === 'Audio' &&
|
|
|
+ <div class={styles.audioBox}>
|
|
|
+ <canvas class={styles.audioVisualizer} id="audioVisualizer"></canvas>
|
|
|
+ <Vue3Lottie class={styles.audioBga} animationData={audioBga} autoPlay={true} loop={true}></Vue3Lottie>
|
|
|
+ <audio
|
|
|
+ crossorigin="anonymous"
|
|
|
+ id="audioMediaSrc"
|
|
|
+ src={state.musicDetail?.videoUrl}
|
|
|
+ controls="false"
|
|
|
+ preload="metadata"
|
|
|
+ playsinline
|
|
|
+ webkit-playsinline
|
|
|
+ />
|
|
|
</div>
|
|
|
- }
|
|
|
- {
|
|
|
- state.playType === 'Audio' &&
|
|
|
- <div class={styles.audioBox}>
|
|
|
- <canvas class={styles.audioVisualizer} id="audioVisualizer"></canvas>
|
|
|
- <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"
|
|
|
+ }
|
|
|
+ {
|
|
|
+ state.playType === 'Video' &&
|
|
|
+ <video
|
|
|
+ id="videoMediaSrc"
|
|
|
+ class={styles.videoBox}
|
|
|
src={state.musicDetail?.videoUrl}
|
|
|
- controls="false"
|
|
|
+ data-poster={ state.musicDetail?.videoImg || videobg}
|
|
|
+ poster={ state.musicDetail?.videoImg || videobg}
|
|
|
preload="metadata"
|
|
|
playsinline
|
|
|
webkit-playsinline
|
|
|
+ x5-playsinline
|
|
|
/>
|
|
|
- </div>
|
|
|
- }
|
|
|
- {
|
|
|
- state.playType === 'Video' &&
|
|
|
- <video
|
|
|
- id="videoMediaSrc"
|
|
|
- class={styles.videoBox}
|
|
|
- src={state.musicDetail?.videoUrl}
|
|
|
- data-poster={ state.musicDetail?.videoImg || videobg}
|
|
|
- poster={ state.musicDetail?.videoImg || videobg}
|
|
|
- preload="metadata"
|
|
|
- playsinline
|
|
|
- webkit-playsinline
|
|
|
- x5-playsinline
|
|
|
- />
|
|
|
- }
|
|
|
- <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 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>
|
|
|
- <div class={styles.landscapeScreen} onClick={handlerLandscapeScreen}></div>
|
|
|
- {/* 谱面 */}
|
|
|
- {
|
|
|
- staffState.staffSrc &&
|
|
|
- <div class={[styles.staffBoxCon, staffState.isShow && styles.staffBoxShow]}>
|
|
|
- <div
|
|
|
- class={styles.staffBox}
|
|
|
- style={
|
|
|
- {
|
|
|
- '--staffBoxHeight':staffState.height
|
|
|
+ <div class={styles.landscapeScreen} onClick={handlerLandscapeScreen}></div>
|
|
|
+ {/* 谱面 */}
|
|
|
+ {
|
|
|
+ staffState.staffSrc &&
|
|
|
+ <div class={[styles.staffBoxCon, staffState.isShow && styles.staffBoxShow]}>
|
|
|
+ <div
|
|
|
+ class={styles.staffBox}
|
|
|
+ style={
|
|
|
+ {
|
|
|
+ '--staffBoxHeight':staffState.height
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- >
|
|
|
- <div class={styles.mask}></div>
|
|
|
- <iframe
|
|
|
- ref={staffDom}
|
|
|
- class={styles.staff}
|
|
|
- frameborder="0"
|
|
|
- src={staffState.staffSrc}>
|
|
|
- </iframe>
|
|
|
+ >
|
|
|
+ <div class={styles.mask}></div>
|
|
|
+ <iframe
|
|
|
+ ref={staffDom}
|
|
|
+ class={styles.staff}
|
|
|
+ frameborder="0"
|
|
|
+ src={staffState.staffSrc}>
|
|
|
+ </iframe>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- }
|
|
|
+ }
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</Sticky>
|
|
|
<div class={styles.musicSection}>
|