This commit is contained in:
Harvey committed 2021-12-10 08:36:46 +08:00
1 parent dc2345306c
commit a6917400c3
10 files changed
+110 -17

No files matched your search

+13 -1
View File
@@ -31,7 +31,10 @@ export default class Artplayer extends Emitter {
super();
this.id = ++id;
this.option = validator(utils.mergeDeep(Artplayer.option, option), scheme);
const mergeOption = utils.mergeDeep(Artplayer.option, option);
this.option = validator(mergeOption, scheme);
this.isFocus = false;
this.isDestroy = false;
this.userAgent = utils.userAgent;
@@ -40,6 +43,7 @@ export default class Artplayer extends Emitter {
this.whitelist = new Whitelist(this);
this.template = new Template(this);
this.events = new Events(this);
if (this.whitelist.state) {
this.storage = new Storage(this);
this.icons = new Icons(this);
@@ -171,6 +175,14 @@ export default class Artplayer extends Emitter {
};
}
get proxy() {
return this.events.proxy;
}
get query() {
return this.template.query;
}
destroy(removeHtml = true) {
this.events.destroy();
this.template.destroy(removeHtml);