优化整体结构

This commit is contained in:
Harvey Zack committed 2019-04-30 13:06:24 +08:00
1 parent 9f9cb0e036
commit 487e865017
34 files changed
+505 -427

No files matched your search

+3 -7
View File
@@ -5,13 +5,9 @@ export default function seekMix(art, player) {
Object.defineProperty(player, 'seek', {
value: time => {
let newTime = Math.max(time, 0);
if (player.duration) {
newTime = Math.min(newTime, player.duration);
}
player.currentTime = newTime;
notice.show(`${secondToTime(newTime)} / ${secondToTime(player.duration)}`);
art.emit('seek', newTime);
player.currentTime = time;
notice.show(`${secondToTime(time)} / ${secondToTime(player.duration)}`);
art.emit('seek', time);
},
});
}