add ads.js

This commit is contained in:
Harvey committed 2021-12-23 13:45:50 +08:00
1 parent 0048991f7e
commit 6c32895d34
7 files changed
+124 -4

No files matched your search

+8 -1
View File
@@ -34,5 +34,12 @@ export default function attrInit(art, player) {
}
$video.controls = false;
player.url = option.url;
if (option.ads.length) {
art.on('ads:end', () => {
player.url = option.url;
});
} else {
player.url = option.url;
}
}