This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
appcat
/
sonist
Archived
1
0
Fork 0

修复暂停播放时拖动进度条的bug

2.x
宇天 2018-12-29 22:33:41 +08:00
parent de24de6d58
commit a4e1c0d5e2
6 changed files with 11 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -145,7 +145,7 @@ table {overflow:auto;display:table;width:100%;line-height:2.5rem;
.item {flex:0 5rem;margin:0 .5rem;line-height:1;font-size:4.2rem;color:nth($ct, 2);@include ts();
&:hover {color:nth($cg, 1)}
&:hover {color:nth($co, 1)}
&:active {color:nth($ct, 1);transform:scale(1.1)}
}
.play {font-size:5rem;}

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,7 @@
.refresh {margin-left:1rem;color:nth($ct, 1);text-decoration:underline;
&:hover {color:nth($cp, 3)}
&:hover {color:nth($co, 1)}
&:active {color:nth($ct, 1);transform:scale(1.1)}
}
}

2
dist/audio/index.js vendored
View File

@ -165,9 +165,7 @@ class AudioPlayer {
if (this.__CURR__ < 0) {
return
}
this.__PLAYER__.pause()
this.__PLAYER__.currentTime = time
this.__PLAYER__.play()
}
}

View File

@ -120,21 +120,26 @@ Anot({
canvas.addEventListener(
'click',
ev => {
if (!this.curr.id) {
return
}
let rect = canvas.getBoundingClientRect()
let aw = rect.width
let ax = ev.pageX - rect.left
let ay = ev.pageY - rect.top
log(aw, ax, ay)
if (ax < 80 && this.curr.id) {
if (ax < 80) {
this.ktvMode = this.ktvMode ^ 1
return
}
if (ax > 124 && ay > 55 && ay < 64) {
let pp = (ax - 124) / (aw - 124)
this.curr.time = pp * this.curr.duration
log(pp, this.curr.time)
SONIST.seek(this.curr.time)
if (!this.isPlaying) {
this.draw()
}
}
},
true