Pause banner plugin

The banner plugin by Nuevodevel allows you to display a banner image ad over the player during each pause event. By default the responsive banner image is centered over the player element. The plugin setup is simple and requires setting at least two options. There are a few other options that you may find useful.
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

When close button enabled, it allows to destroy the banner ad permanently.
Code snippet
<script>
player.banner({
src: "url-of-the-banner-image",
href: "url-to-go-on-banner-click"
closeButton: true
});
</script>
If you define banner id and trackViewstrackClickthrough, or trackClose script 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_id


The 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.