1 |
- System.register(["./index-legacy-3851b920.js"],(function(e,t){"use strict";var i,n,o,a,r,l,s,d,m,u,c,g,p,v,h,_,x,S,b,w,T,y=document.createElement("style");return y.textContent="._skeleton_1ro2x_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_1ro2x_12{width:100vw;height:auto;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:transparent}._detail_1ro2x_12 ._container_1ro2x_20{margin:0 .26667rem;border-radius:.26667rem}._detail_1ro2x_12 #osmdCanvasPage1{position:relative!important}._detail_1ro2x_12 #musicAndSelection{height:initial!important;max-height:initial!important}._detail_1ro2x_12 .smoothAnimationBox{height:0!important;overflow:hidden}\n",document.head.appendChild(y),{setters:[e=>{i=e.d,n=e.g,o=e.n,a=e.c,r=e.bF,l=e.m,s=e.bG,d=e.ae,m=e.h,u=e.av,c=e.a0,g=e.V,p=e.bH,v=e.bI,h=e.aD,_=e.bJ,x=e.bK,S=e.bL,b=e.bM,w=e.bN,T=e.bO}],execute:function(){const t="_detail_1ro2x_12",y="_container_1ro2x_20";e("default",i({name:"simple-detail",setup(){const e=n(),i=o({isLoading:!0,currentTime:0,totalTime:6e4}),f=e=>{var t;"playProgress"===(null==e||null===(t=e.data)||void 0===t?void 0:t.api)&&null!=e&&e.data.data&&(l.playState="play",console.log(e.data))},F=e=>{var t,n,o;i.currentTime=(null==e?void 0:e.currentTime)||(null==e||null===(t=e.content)||void 0===t?void 0:t.currentTime),i.totalTime=(null==e?void 0:e.totalDuration)||(null==e||null===(n=e.content)||void 0===n?void 0:n.totalDuration),i.currentTime,(null==e||null===(o=e.content)||void 0===o?void 0:o.totalDuration)>1e3&&(i.currentTime,i.totalTime)};a((async()=>{const t=e.id||"";await r(t),i.isLoading=!1,l.isSingleLine=!0,l.isSimplePage=!0,s(F),window.addEventListener("message",f)})),d((()=>{l.isSimplePage=!1,window.removeEventListener("message",f)}));const L=async e=>{console.log("渲染完成"),l.osmd=e,0===l.originSpeed&&(l.originSpeed=l.speed=e.bpm||e.Sheet.userStartTempoInBPM||100);const t=(c.get("speeds")||{})[l.examSongId]||l.speed||e.bpm||e.Sheet.userStartTempoInBPM;t&&g(t),p(),v(),l.times=h(e),console.log("🚀 ~ state.times:",l.times,l.subjectId,l),_(l.times),x(),S.isShow.value=!1,l.playState="play",C()},P=()=>{i.currentTime+=.03;const e=i.currentTime,t=i.totalTime;l.playProgress=e/t*100;let n=b(e);n&&w(n),l.isSingleLine&&T(e)},C=()=>{if("play"!==l.playState)return void console.log("暂停播放");let e=Date.now();requestAnimationFrame((()=>{Date.now()-e<16.7?(P(),C()):setTimeout((()=>{P(),C()}),16.7)}))};return()=>m("div",{class:t},[m("div",{id:"scrollContainer",class:[y,"hideCursor"]},[!i.isLoading&&m(u,{onRendered:L,musicColor:"#FFFFFF"},null)])])}}))}}}));
|