|
@@ -548,7 +548,7 @@ const startPlay = () => {
|
|
|
RuntimeUtils.setPlayState()
|
|
|
}
|
|
|
|
|
|
-const setPlayer = async () => {
|
|
|
+export const setPlayer = async () => {
|
|
|
// 连接中,禁止重复连接
|
|
|
if (connentLoading.value) return
|
|
|
runtime.clickTime = new Date().getTime()
|
|
@@ -577,10 +577,12 @@ const setPlayer = async () => {
|
|
|
runtime.evaluatingStatus = false
|
|
|
Toast.clear()
|
|
|
}
|
|
|
- evaluatStart()
|
|
|
+ if (!detailState.needTick) {
|
|
|
+ evaluatStart()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-const togglePlay = () => {
|
|
|
+const togglePlay = async () => {
|
|
|
if (detailState.isPauseRecording) {
|
|
|
evaluating.value = false
|
|
|
startPlay()
|
|
@@ -675,6 +677,9 @@ const endevent = (evt: Event) => {
|
|
|
|
|
|
/**正式开始评测 */
|
|
|
const evaluatStart = () => {
|
|
|
+ if (detailState.needTick) {
|
|
|
+ setPlayer()
|
|
|
+ }
|
|
|
playStatus.value = 'play'
|
|
|
if (detailState.isPauseRecording) {
|
|
|
postMessage(
|
|
@@ -982,8 +987,13 @@ export default defineComponent({
|
|
|
'transform': detailState.isSpecialShapedScreen ? `translateX(${detailState.notchHeight / 4}px)` : '',
|
|
|
}}
|
|
|
class={[styles.evaluatStartBtn]}
|
|
|
- onClick={() => {
|
|
|
- setPlayer()
|
|
|
+ onClick={async () => {
|
|
|
+ // 评测模式,如果有系统节拍器,需要先播放系统节拍器
|
|
|
+ if (detailState.needTick) {
|
|
|
+ await RuntimeUtils.setEvaluatTick()
|
|
|
+ } else {
|
|
|
+ setPlayer()
|
|
|
+ }
|
|
|
}}
|
|
|
></div>
|
|
|
)}
|