mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-12 15:26:16 -08:00
refactor: Update VAST plugin in Artplayer
This commit is contained in:
1 parent
f9192ff852
commit
87b0506f51
5 files changed
+32
-17
No files matched your search
@@ -1,3 +1,7 @@
|
||||
// Depends on:
|
||||
// https://glomex.github.io/vast-ima-player/
|
||||
// https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side
|
||||
|
||||
// npm i artplayer-plugin-vast
|
||||
// import artplayerPluginVast from 'artplayer-plugin-vast';
|
||||
|
||||
@@ -7,8 +11,11 @@ var art = new Artplayer({
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
plugins: [
|
||||
artplayerPluginVast(({ playUrl }) => {
|
||||
//
|
||||
artplayerPluginVast(({ playUrl, imaPlayer, ima }) => {
|
||||
// Play the ad when the video is played
|
||||
art.once('play', () => {
|
||||
playUrl('https://artplayer.org/assets/vast/linear-ad.xml');
|
||||
});
|
||||
}),
|
||||
],
|
||||
});
|
||||
Reference in new issue
Block a user