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

boxcast-sdk-js

v1.4.1

Published

[![Build Status](https://travis-ci.org/boxcast/boxcast-sdk-js.svg?branch=master)](https://travis-ci.org/boxcast/boxcast-sdk-js)

Downloads

47

Readme

BoxCast SDK for JavaScript

Build Status

This library can be used for custom integration projects where the standard BoxCast embedded player may not suffice.

We do strongly encourage you to use the standard embedded player instead of this library where possible, because it is the most robust and well-tested playback option.

See Related:

Getting Started

<script src="https://js.boxcast.com/libs/boxcast-sdk-latest.min.js"></script>
<script>
  var analytics = BoxCastSDK.analytics;
  var api = BoxCastSDK.api;
</script>

or, install via NPM

# First, install the SDK from NPM
npm install boxcast-sdk-js --save

# Then, in your javascript project:
var { analytics, api } = require('boxcast-sdk-js');

You will need to know your BoxCast account ID and corresponding channel IDs in order to properly utilize this library. Contact BoxCast developer support if you need assistance.

Public API Queries

Use the api object to query the BoxCast API in public scope. All methods return a promise. List responses contain both pagination information and resulting data.

Notes:

  • Authenticated or restricted broadcasts (ticketed, etc) are not supported and must be viewed in the native boxcast.js player.
  • Your API credentials (client ID, secret) are not required to access these routes.
api.channels.list(account_id, {
  s: 'name', // sort by
  l: 20,     // page limit
  p: 0       // page number
}).then((r) => console.log(r.pagination, r.data));

api.broadcasts.list(channel_id, {
  q: 'timeframe:current',
  s: '-starts_at',
  l: 20,
  p: 0
}).then((r) => console.log(r.pagination, r.data));

api.broadcasts.get(broadcast_id)
  .then((broadcast) => console.log(broadcast));

api.views.get(broadcast_id, {
  channel_id: channel_id,
  host: window.location.hostname,
  extended: true
}).then((view) => console.log(view));

Analytics

Use the analytics object to ensure your custom video player is properly reporting playback metrics.

analytics.configure({
  browser_name: 'My Browser',       // or detected automatically from user agent
  browser_version: '3.0',           // or detected automatically from user agent
  player_version: 'my-player v2.1'  // or defaults to current version of boxcast-sdk-js
});

analytics.mode('html5').attach({
  video: document.querySelector('video'),
  broadcast: broadcast,             // must contain keys: timeframe, id, account_id
  channel_id: channel_id            // or defaults to broadcast.channel_id
});

// ... or if using video.js ... //

analytics.mode('video.js').attach({
  player: player, broadcast: broadcast, channel_id: channel_id
});

Authenticated API Queries

Use the api.auth object to query the BoxCast API in an authenticated scope, using your API client credentials. Like the public API quries, all methods return a promise.

Notes:

  • When calling api.auth.authenticate, an access_token is retrieved and stored within the global scope of the application. This must be called each time the application is reloaded to obtain a new token.
  • Your API credentials (client ID, secret) are required to access these methods, and these values should never be shared. As a result, please do not allow this code to run within a client application in a browser.
api.auth.authenticate(
  CLIENT_ID, CLIENT_SECRET
).then((r) => {
  console.log('Authenticated!', r);

  api.auth.account()
    .then((account) => console.log(account));

  api.auth.channels.create({
    name: 'My New Channel'
  }).then((channel) => {
    console.log('Created a new channel:', channel);

    api.auth.channels.list({
        s: 'name', // sort by
        l: 20,     // page limit
        p: 0       // page number
    }).then((r) => console.log('All Channels:', r.pagination, r.data));
  });

  api.auth.broadcasts.list({
    q: 'timeframe:current',
    s: '-starts_at',
    l: 20,
    p: 0
  }).then((r) => console.log('All Broadcasts:', r.pagination, r.data));

  api.auth.broadcasts.get(broadcast_id)
    .then((broadcast) => console.log(broadcast));

  api.auth.logout();
});