Commit aee7dcdd authored by 15011343103's avatar 15011343103

feat: 暂停逻辑修改

parent 7f7c03c9
......@@ -1811,6 +1811,13 @@ new Vue({
// 处理空格键
if (event.code === 'Space') {
event.preventDefault(); // 阻止页面滚动
if (this.isPlaying) {
this.wavesurfer.pause();
this.isPlaying = false;
clearTimeout(this.playTimer);
return;
}
// 如果页面已锁定,检查当前位置是否在锁定范围内
if (this.isPageLocked) {
......@@ -1834,7 +1841,7 @@ new Vue({
const currentTime = this.wavesurfer.getCurrentTime();
if (currentTime >= this.currentGroup.end) {
this.wavesurfer.seekTo(this.currentGroup.start / this.wavesurfer.getDuration());
}
}
// 开始播放
this.wavesurfer.play();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment