docs update

This commit is contained in:
Harvey Zack committed 2018-11-14 17:18:17 +08:00
1 parent d26826401a
commit 53cbde0ff0
4 files changed
+43 -16

No files matched your search

+13 -3
View File
@@ -5245,6 +5245,8 @@
createClass(Artplayer, [{
key: "init",
value: function init() {
var _this2 = this;
this.isFocus = false;
this.isPlaying = false;
this.refs = {};
@@ -5255,6 +5257,12 @@
this.refs.$container = document.querySelector(this.option.container);
}
if (Artplayer.instances.some(function (art) {
return art.refs.$container === _this2.refs.$container;
})) {
errorHandle(false, 'Cannot mount multiple instances on the same dom element');
}
this.template = new Template(this);
this.storage = new Storage(this);
this.i18n = new I18n(this);
@@ -5359,8 +5367,8 @@
style: {}
},
moreVideoAttr: {
'controls': false,
'preload': 'auto'
controls: false,
preload: 'auto'
},
lang: navigator.language.toLowerCase()
};
@@ -5370,7 +5378,9 @@
return Artplayer;
}(tinyEmitter);
Artplayer.instances = [];
Object.defineProperty(Artplayer, 'instances', {
value: []
});
window.Artplayer = Artplayer;
exports.default = Artplayer;