浏览代码

fix: 选段速度修改

TIANYONG 6 月之前
父节点
当前提交
0dad948782
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/state.ts

+ 2 - 1
src/state.ts

@@ -687,7 +687,8 @@ const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
 export const initSetPlayRate = () => {
   let item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
   console.log('播放状态',state.playState)
-  if (state.playState === 'paused' && state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML) {
+  // 如果是选段,并且不是选段内的第一小节,取当前小节的速度
+  if (state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML) {
     item = state.times[state.activeNoteIndex];
   }
   if (item && item.measureSpeed) {