Adx ads integration for VideoJS
npm install videojsadxnpm i videojsadx ORhttps://cdn.jsdelivr.net/npm/videojsadx@[version_number]/dist/videojsadx.jsAdditionally have to add this script in "head"
``html`
`html`
Parameter description:
-
- For multiple insertions change ID's for each element.
- }, 'video-container-1');
- If ID changed, change here as well
-
videoSrc:
- Initial video on page load
- thumbnailSrc:
- Initial video thumbnail
- thumbnailTitle:
- Initial video title
- initialAutoplay:
- Autoplay on page load
- muted:
- Play with sound on page load (NB! If initial autoplay also is turned on, video won't autoplay until users first interaction with page (click) because of global enhancing user experience policy.)
- playlist:
- Can be removed if no playlist required.
- Initial video automatically included as the first playlist element
- videoSrc:
- Video source for playlist item
- thumbnailSrc:
- Thumbnail source for playlist item
- If video source local, thumbnail will be autogenerated if not provided
- thumbnailTitle:
- Video title for playlist item
- If any of playlist items has title, others will be auto populated
- playlistAutoTitles:
- Automatically populate playlist items with titles even if none provided
- playlistAutoplay:
- Playlist autoplay
- miniPlayer:
- DESKTOP
- Can be removed if no mini player required.
- showOnlyOnAds:
- Show mini player only when ad is playing or all the time.
- width:
- Mini player width (px / % / ect). Height will be adjusted to aspect ratio.
- position:
- Values: { tl / tr / bl / br }
- spacing:
- Values: [ { t / b } px / % / ect , { l / r } px / % / ect ]
- miniPlayerMobile:
- MOBILE
- Can be removed if no mini player required.
- showOnlyOnAds:
- Show mini player only when ad is playing or all the time.
- width:
- Mini player width (px / % / ect). Height will be adjusted to aspect ratio.
- position:
- Values: { tl / tr / bl / br }
- spacing:
- Values: [ { t / b } px / % / ect , { l / r } px / % / ect ]
- adUnit:
- AdX ad unit.
- overlayAdElement:
- Overlay Ad tag code (with divs and stuff). (!NB code only. If this is not an independent code, all calls need to be added manually)
- watermark:
- Values { true / false / URL } (Setupad logo enabled by default)
- debug:`