Skip to content

kslimani/clappr-html5-preroll-skeleton-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML5 preroll ad skeleton plugin for clappr.

HTML5 preroll ad skeleton plugin for Clappr video player.

This is only a proof of concept which attempt to demonstrate the requirements in order to be able to play an HTML5 video preroll advert on desktop but also on mobile devices.

This may not the "way to go" with Clappr to achieve this goal. (only the way i found).

This is also an attempt to push missing/required Clappr features in order to be able to create Ad plugins.

Usage

Add both Clappr and the plugin scripts to your HTML:

<head>
  <script type="text/javascript" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
  <script type="text/javascript" src="dist/clappr-html5-preroll-plugin.js"></script>
</head>

Then just add ClapprHtml5PrerollPlugin into the list of plugins of your player instance, and the options for the plugin go in the html5PrerollPlugin property as shown below.

var player = new Clappr.Player({
  source: "http://your.video/here.mp4",
  plugins: {
    core: [ClapprHtml5PrerollPlugin],
  },
  html5PrerollPlugin: {
    /* plugin configuration */
  }
});

Development

Install dependencies :

  npm install

Dist build :

  npm run dist

Watch mode :

  npm run watch

Start HTTP server (http://0.0.0.0:8080/demo/) :

  npm run demo

About

HTML5 preroll ad skeleton plugin for clappr.

Resources

Stars

Watchers

Forks

Packages

No packages published