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

@brandbrigade/ott-bb-player

v1.1.2

Published

ott bb player

Readme

OTT-BB-Player

BrandBrigade OTT Player SDK for targeted ad augmentation on live streams.

Installation

npm install @brandbrigade/ott-bb-player

Usage

Initialization

const bbPlayer = new BB.OTTPlayer(
  videoElement,
  frameRate, // e.g., 30000/1001 for 29.97 fps
  {
    gameId: 'game_identifier',
    augmentation: { channelName: 'channel_name' }
  }
);

API Reference

Event Integration

onNewMetadata(event)

Forward MediaKind metadata events containing timecode information.

wmcMgr.addEventListener(wmcEvents.AMC_EVENT_PLAYER_METADATA, (event) => {
  bbPlayer.onNewMetadata(event);
});

onNewSegment(event)

Forward MediaKind segment playback events for synchronization.

wmcMgr.addEventListener(wmcEvents.AMC_EVENT_PLAYER_SEGMENT_PLAYBACK, (event) => {
  bbPlayer.onNewSegment(event);
});

onAdEvent(eventType)

Notify player of ad events to pause/resume augmentation.

bbPlayer.onAdEvent('start'); // Pause augmentation during ad
bbPlayer.onAdEvent('end');   // Resume augmentation after ad

Control Methods

toggle(enabled)

Enable or disable augmentation rendering.

bbPlayer.toggle(true);  // Enable
bbPlayer.toggle(false); // Disable

setMediaInfo(mediaInfo)

Update media stream information (fps, bitrate).

bbPlayer.setMediaInfo({ fps: 29.97, bitrate: 5000000 });

setFps(fps)

Update frame rate independently.

bbPlayer.setFps(29.97);

Asset Override Methods

setAd(source, placeholder?)

Override ad creative at runtime. Accepts URL, Blob, or ImageBitmap.

bbPlayer.setAd('https://example.com/ad.png', 'brand_name');
bbPlayer.setAd(adBlob);
bbPlayer.setAd(imageBitmap);

setLED(source)

Override LED board creative. Accepts URL, Blob, or ImageBitmap.

bbPlayer.setLED('https://example.com/led.png');
bbPlayer.setLED(ledBlob);
bbPlayer.setLED(imageBitmap);

setGameParams(gameParams)

Manually override game parameters (offsets, bucket info).

bbPlayer.setGameParams({
  bucketName: 'game-bucket',
  offsets: [{ frame: 0, offset: 0, timecode: '00:00:00:00' }],
  startZip: 'start.zip',
  endZip: 'end.zip',
  customerId: 'customer_id',
  customerName: 'Customer Name'
});

Event Subscription

on(eventName, listener)

Subscribe to player events.

bbPlayer.on('augmentationStatusChanged', (event) => {
  console.log('Status:', event.detail);
});

off(eventName, listener)

Unsubscribe from player events.

bbPlayer.off('augmentationStatusChanged', listener);

Lifecycle

destroy()

Cleanup and dispose of player instance. Terminates workers, removes event listeners, and frees resources.

bbPlayer.destroy();

Platform Support

  • Chrome (Mac, Windows)

Changelog

Version v1.0.47 - OTT Web rebuild, supports Chrome Mac

Version v1.0.49 - Fixed augmentation size bug, Updated configurations

Version v1.0.50 - Fixed multiple instances of OTT Player, Applied SetInterval in Adepter, Added OTTActions support

Version v1.0.52 - Adapter, Downloader and Decoder Settings added to global player options

Version v1.0.53 - More debug metrix added, Pixel tickers color changed to dark gray

Version v1.0.55 - Pattern tracking based renderer calls implemented

Version v1.0.57 - Added support for Windows Chrome, Updated logging

Version v1.0.58 - Improve support for Windows Chrome

Version v1.0.59 - Logging to Datadog Enabled Minor improvements

Version v1.0.60 -

  • Game parameters are now fetched every 10 seconds.
  • After seeking, if new metadata with a relevant timecode is not received, the augmentation will stop.
  • Fixed an issue where the timecode exceeds 24 hours.

Version v1.0.61 - WebGL Quad rendering optimization Added error logging in case of the missing JSON in zip

Version v1.0.62 - Minor Update

Version v1.0.63 - Added setMediaInfo(mediaInfo: { fps?: number; bitrate?: number }) for communication with MK Added logging metrics to backend Hardcoded BurkerKing logo to be replaced by campaigns Dev tests of Firefox support

Version v1.0.64 - Added Beacon Evenst Added onAdEvent Ad campaings connected Added internal metrics logging to cloud

Version v1.0.65 - Added global augmentation status to beacon events Console logs cleared

Version v1.0.66 - Minor fixes

Version v1.0.67 - Killswitch status is now checked on game params headers instead of zip headers Added metrics for zip fetch as URL parameters Implemented a zip fetch retry mechanism while there is still time to fetch them Added OTTPlayer off method to unsubscribe from player events Implemented destroy method to properly dispose OTTPlayer instances

Version v1.0.68 - Zip download logic fixed

Version v1.1.00 -

  • Add banchmarking
  • Add Lifecicle management
  • Add status overlay
  • Fix toggle(flag: boolean)
  • Update onAdEvent(eventType: 'start' | 'end') logic

Version v1.1.1 -

  • Fix no augmentation when showAugmentationStatus: false
  • Reset ads to default if no arguments provided to setAd()