mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 11:21:20 -08:00
docs update
This commit is contained in:
1 parent
d26826401a
commit
53cbde0ff0
4 files changed
+43
-16
No files matched your search
+13
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user