build all packages

This commit is contained in:
zhw2590582 committed 2019-05-25 12:50:02 +08:00
1 parent 416e79705c
commit 0af2403bb8
8 files changed
+43 -17

No files matched your search

+9 -6
View File
@@ -9,12 +9,15 @@ export default class Events {
this.proxy = this.proxy.bind(this);
this.hover = this.hover.bind(this);
this.loadImg = this.loadImg.bind(this);
art.once('video:canplay', () => {
clickInit(art, this);
hoverInit(art, this);
mousemoveInit(art, this);
resizeInit(art, this);
});
if (art.whitelist.state) {
art.once('video:canplay', () => {
clickInit(art, this);
hoverInit(art, this);
mousemoveInit(art, this);
resizeInit(art, this);
});
}
}
proxy(target, name, callback, option = {}) {
+1 -1
View File
@@ -126,6 +126,7 @@ class Artplayer extends Emitter {
init() {
this.whitelist = new Whitelist(this);
this.template = new Template(this);
this.events = new Events(this);
if (this.whitelist.state) {
this.isFocus = false;
this.isDestroy = false;
@@ -133,7 +134,6 @@ class Artplayer extends Emitter {
this.icons = new Icons(this);
this.i18n = new I18n(this);
this.notice = new Notice(this);
this.events = new Events(this);
this.player = new Player(this);
this.layers = new Layers(this);
this.controls = new Controls(this);
+8
View File
@@ -1,12 +1,20 @@
import config from './config';
import { clamp, getExt } from './utils';
export default class Mobile {
constructor(art) {
const {
option,
events: { proxy },
template: { $video },
} = art;
config.video.events.forEach(eventName => {
proxy($video, eventName, event => {
art.emit(`video:${event.type}`, event);
});
});
Object.keys(option.moreVideoAttr).forEach(key => {
$video[key] = option.moreVideoAttr[key];
});