mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
update mobile demo
This commit is contained in:
1 parent
a831975f4f
commit
829d3a4b42
5 files changed
+25
-15
No files matched your search
@@ -99,7 +99,7 @@ export default function artplayerPluginAds(option) {
|
||||
$ads = append(
|
||||
art.template.$ads,
|
||||
option.video
|
||||
? `<video class="artplayer-plugin-ads-video" src="${option.video}" loop></video>`
|
||||
? `<video class="artplayer-plugin-ads-video" src="${option.video}" loop playsInline></video>`
|
||||
: `<div class="artplayer-plugin-ads-html">${option.html}</div>`,
|
||||
);
|
||||
|
||||
@@ -136,6 +136,15 @@ export default function artplayerPluginAds(option) {
|
||||
const $muted = query('.artplayer-plugin-ads-muted', $control);
|
||||
const $fullscreen = query('.artplayer-plugin-ads-fullscreen', $control);
|
||||
|
||||
if (option.url) {
|
||||
art.proxy($detail, 'click', () => {
|
||||
window.open(option.url);
|
||||
art.emit('artplayerPluginAds:click', option);
|
||||
});
|
||||
} else {
|
||||
setStyle($detail, 'display', 'none');
|
||||
}
|
||||
|
||||
if (option.video) {
|
||||
const $volume = append($muted, volume);
|
||||
const $volumeClose = append($muted, volumeClose);
|
||||
@@ -174,11 +183,6 @@ export default function artplayerPluginAds(option) {
|
||||
if (option.url) window.open(option.url);
|
||||
art.emit('artplayerPluginAds:click', option);
|
||||
});
|
||||
|
||||
art.proxy($detail, 'click', () => {
|
||||
if (option.url) window.open(option.url);
|
||||
art.emit('artplayerPluginAds:click', option);
|
||||
});
|
||||
}
|
||||
|
||||
art.on('ready', () => {
|
||||
|
||||
Reference in new issue
Block a user