修改包管理

This commit is contained in:
Harvey Zack committed 2018-11-07 17:12:42 +08:00
1 parent c5c673ae79
commit 0aa018db6d
99 files changed
+70 -70

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { secondToTime } from '../utils';
export default class Time {
constructor(option) {
this.option = option;
}
apply(art, $control) {
$control.innerHTML = '00:00 / 00:00';
function setTime() {
$control.innerHTML = `${secondToTime(art.player.currentTime())} / ${secondToTime(art.player.duration())}`;
}
art.on('video:canplay', () => {
setTime();
});
art.on('video:timeupdate', () => {
setTime();
});
art.on('video:seeking', () => {
setTime();
});
}
}