add ads.init()

This commit is contained in:
Harvey committed 2021-12-23 17:20:32 +08:00
1 parent 558e439261
commit 9f7abe181c
3 files changed
+28 -22

No files matched your search

+14 -10
View File
@@ -4733,16 +4733,7 @@
_classCallCheck(this, Ads);
this.art = art;
var option = art.option;
this.index = 0;
this.isEnd = false;
this.playing = false;
this.urlCache = option.url;
if (this.current) {
this.playing = true;
this.play(this.current);
}
this.init();
}
_createClass(Ads, [{
@@ -4760,6 +4751,19 @@
get: function get() {
return this.art.option.ads[this.index + 1];
}
}, {
key: "init",
value: function init() {
this.index = 0;
this.isEnd = false;
this.playing = false;
this.urlCache = this.art.option.url;
if (this.current) {
this.playing = true;
this.play(this.current);
}
}
}, {
key: "play",
value: function play() {