npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

adaptus2-player

v1.0.0

Published

A customizable Video.js player with hero overlays, CTAs, tracking and redirects

Readme

Adaptus2Player

Adaptus2Player is an easy-to-use, highly customizable Video.js player that simplifies adding robust video functionality to your website. Features include hero overlay for inline mobile playback, configurable CTAs, redirect handling, granular control over player features, optional playback tracking, and a fullscreen change callback.

Installation

Choose one of the following methods:

1. Direct Script Include (Local Build)

After building the project (npm run build), include the UMD bundle in your HTML:

<script src="./dist/adaptus2-player.umd.js"></script> <!-- Adaptus2Player.js entrypoint fileciteturn1file0 -->

2. npm Package

Install via npm:

npm install adaptus2-player

Import and initialize in your code:

// ES module import
import Adaptus2Player from 'adaptus2-player'; // package.json: name/module fields fileciteturn1file1

Adaptus2Player({
  targetDiv: '#videoContainer',
  videoSrc: '/path/to/video.mp4'
});

Or CommonJS:

const Adaptus2Player = require('adaptus2-player');
Adaptus2Player({ targetDiv: '#videoContainer', videoSrc: '/path/to/video.mp4' });

3. CDN (unpkg / jsDelivr)

Use unpkg:

<script src="https://unpkg.com/[email protected]/dist/adaptus2-player.umd.js"></script> <!-- Rollup output config fileciteturn1file3 -->

Or jsDelivr:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/adaptus2-player.umd.js"></script>

Basic Usage

Include a container in your HTML:

<div id="videoContainer"></div>

Initialize with minimal options:

Adaptus2Player({
  targetDiv: '#videoContainer',
  videoSrc: 'https://example.com/myvideo.mp4'
});

Configuration Options

| Option | Type | Default | Description | | -------------------------- | -------- | ----------------- | ------------------------------------------------------------------------------ | | targetDiv | String | #videoContainer | CSS selector for the container where the player is injected. | | videoSrc | String | /myvideo.mp4 | URL of the video file or stream. | | videoDuration | Number | 300 | Total video duration in seconds (used for CTA timing). | | heroImage | String | — | URL of an overlay image/GIF. Displays until tapped (mobile inline playback). | | ctaText | String | — | HTML content for a CTA, shown before the video ends. | | redirectUrl | String | — | URL to navigate to when the video finishes. | | offerShowOffset | Number | 45 | Seconds before the end of the video to reveal the CTA. | | showControls | Boolean | true | Toggle Video.js controls visibility (maps to controls attribute). | | enableVolume | Boolean | true | Enable volume control in the control bar. | | enableSeek | Boolean | true | Enable seek/progress controls (e.g., fast forward, time displays). | | trackingUrl | String | — | If provided, playback time is POSTed here at each trackingInterval. | | trackingInterval | Number | 10 | Seconds between tracking POST events. | | fullscreenChangeCallback | Function | — | Callback invoked on fullscreen toggles; receives the Video.js player instance. |

Note: This list matches the options supported by the player’s initialization code in Adaptus2Player.js fileciteturn1file0.

Examples

Show a CTA 30 seconds before end

Adaptus2Player({
  targetDiv: '#videoContainer',
  videoSrc: '/video.mp4',
  ctaText: '<a href="/offer">Grab 20% Off!</a>',
  offerShowOffset: 30
});

Disable Volume & Seek

Adaptus2Player({
  targetDiv: '#videoContainer',
  videoSrc: '/video.mp4',
  showControls: true,
  enableVolume: false,
  enableSeek: false
});

Enable Playback Tracking

Adaptus2Player({
  targetDiv: '#videoContainer',
  videoSrc: '/video.mp4',
  trackingUrl: 'https://your-analytics.com/track',
  trackingInterval: 5
});

Building from Source

  1. Clone the repo

    git clone https://github.com/mataluis2k/Adaptus2Player.git
    cd Adaptus2Player
  2. Install dependencies

    npm install            # includes rollup and plugins fileciteturn1file1
  3. Build

    npm run build          # outputs UMD & ESM bundles in `dist/` per rollup.config.js fileciteturn1file3

License

MIT © Luis B. Mata