src *
banner image URL (required)
href *
URL to go on banner click (required)
target
Link target - _blank or _self (default: "_blank")
position
Banner vertical position - "top" or "bottom" (default: "center")
resumeText
Resume button text (default: "Resume")
closeButton
Show close button - removes banner definitely on click (default:false)
id
optional unique id for banner ad (required for tracking)
trackViews
optional URL of the script to track banner views (banner id required)
trackClickthrough
optional URL of the script to track banner click (banner id required)
trackClose
optional URL of the script to track banner close event (banner id required)
Code setup
Code snippet
<script src="/path/to/videojs/plugins/videojs.banner.js"></script><script>player.banner({src: "url-of-the-banner-image",href: "url-to-go-on-banner-click"});</script>Banner on pause with the Close button
Code snippet
<script>player.banner({src: "url-of-the-banner-image",href: "url-to-go-on-banner-click"closeButton: true});</script>idand
trackViews,
trackClickthrough, or
trackClosescript URL, the plugin will execute the appropriate script with the given id as a query parameter, e.g.
Code snippet
your_trackViews_script.php?id=banner_idThe banner plugin is included in all three available plans of the software offered by NuevoDevel.com. The plugin is also available as ESM and CJS modules, ready to deploy in React, Vue and Angular apps.