格式化

This commit is contained in:
Harvey Zack committed 2018-11-21 19:45:44 +08:00
1 parent 0454f785be
commit 203ad0d3a0
75 files changed
+3120 -2904

No files matched your search

+12 -12
View File
@@ -1,17 +1,17 @@
import { secondToTime } from '../utils';
export default function seekMix(art, player) {
const { notice } = art;
const { notice } = art;
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);
}
});
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);
},
});
}