This commit is contained in:
Harvey Zack committed 2018-10-24 13:43:11 +08:00
1 parent 9fd3e580bb
commit 4ce05442c7
36 files changed
+731 -683

No files matched your search

+7 -4
View File
@@ -2,17 +2,20 @@ import { append } from '../utils';
import icons from '../icons';
export default class PlayAndPause {
constructor(art, option) {
this.art = art;
constructor(option) {
this.option = option;
}
apply(art) {
this.art = art;
this.init();
}
init() {
const { events: { proxy }, player } = this.art;
this.$play = append(this.option.ref, icons.play);
this.$pause = append(this.option.ref, icons.pause);
this.$play = append(this.option.$control, icons.play);
this.$pause = append(this.option.$control, icons.pause);
this.$pause.style.display = 'none';
proxy(this.$play, 'click', () => {