修复暂停播放时拖动进度条的bug
parent
de24de6d58
commit
a4e1c0d5e2
File diff suppressed because one or more lines are too long
|
@ -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();
|
.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)}
|
&:active {color:nth($ct, 1);transform:scale(1.1)}
|
||||||
}
|
}
|
||||||
.play {font-size:5rem;}
|
.play {font-size:5rem;}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
.refresh {margin-left:1rem;color:nth($ct, 1);text-decoration:underline;
|
.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)}
|
&:active {color:nth($ct, 1);transform:scale(1.1)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,9 +165,7 @@ class AudioPlayer {
|
||||||
if (this.__CURR__ < 0) {
|
if (this.__CURR__ < 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.__PLAYER__.pause()
|
|
||||||
this.__PLAYER__.currentTime = time
|
this.__PLAYER__.currentTime = time
|
||||||
this.__PLAYER__.play()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,21 +120,26 @@ Anot({
|
||||||
canvas.addEventListener(
|
canvas.addEventListener(
|
||||||
'click',
|
'click',
|
||||||
ev => {
|
ev => {
|
||||||
|
if (!this.curr.id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let rect = canvas.getBoundingClientRect()
|
let rect = canvas.getBoundingClientRect()
|
||||||
let aw = rect.width
|
let aw = rect.width
|
||||||
let ax = ev.pageX - rect.left
|
let ax = ev.pageX - rect.left
|
||||||
let ay = ev.pageY - rect.top
|
let ay = ev.pageY - rect.top
|
||||||
|
|
||||||
log(aw, ax, ay)
|
log(aw, ax, ay)
|
||||||
if (ax < 80 && this.curr.id) {
|
if (ax < 80) {
|
||||||
this.ktvMode = this.ktvMode ^ 1
|
this.ktvMode = this.ktvMode ^ 1
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (ax > 124 && ay > 55 && ay < 64) {
|
if (ax > 124 && ay > 55 && ay < 64) {
|
||||||
let pp = (ax - 124) / (aw - 124)
|
let pp = (ax - 124) / (aw - 124)
|
||||||
this.curr.time = pp * this.curr.duration
|
this.curr.time = pp * this.curr.duration
|
||||||
log(pp, this.curr.time)
|
|
||||||
SONIST.seek(this.curr.time)
|
SONIST.seek(this.curr.time)
|
||||||
|
if (!this.isPlaying) {
|
||||||
|
this.draw()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
|
Reference in New Issue