videojs-contrib-ads is separated into files by module.
The entry point of the application. Registers the plugin with video.js and initializes other feature modules.
Implements the public API.
Common code that is invoked when ad breaks start and end. Used by Preroll.js, Midroll.js, and Postroll.js.
Feature that prevents content playback while prerolls are handled. cancelContentPlay is used when video.js middleware is not available.
Feature that prevents content playback while prerolls are handled. playMiddleware is used when video.js middleware is available.
Styles for the ad player.
Feature that makes the presense of ads transparent to event listeners.
Feature that captures the player state before ads and restores it after ads.
Used to import modules from the
states folder. This works around an issue with bundler where importing the files directly may not load them in the correct order.
The states folder contains the various states that videojs-contrib-ads can be in.
States in the
abstract subfolder are subclassed by the main states in the
states folder itself. They implement common functionality used by similar states.
Learn more about states.