use ads.current

This commit is contained in:
Harvey committed 2021-12-23 15:50:50 +08:00
1 parent 76eea4bfd5
commit b584550917
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -8,9 +8,9 @@ export default class Ads {
this.playing = false;
this.urlCache = option.url;
if (option.ads.length) {
if (this.current) {
this.playing = true;
this.play(option.ads[this.index]);
this.play(this.current);
}
}
@@ -45,8 +45,8 @@ export default class Ads {
}
end() {
this.playing = false;
this.isEnd = true;
this.playing = false;
this.art.option.url = this.urlCache;
this.art.player.switchUrl(this.urlCache);
this.art.emit('ads:end');