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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bitmovin-analytics

v2.42.1

Published

Bitmovin Analytics Collector collects monitoring events from video players for the Bitmovin Analytics Service

Downloads

23,397

Readme

Bitmovin Analytics Collector

npm version install size

Instruments adaptive streaming video players and collects information to be sent to the Bitmovin Analytics service.

To get started collecting data with Bitmovin Analytics you need a License-Key which you can get for free by signing up for a free Bitmovin account.

Supported Players

The supported video players are shown here: Analytics Collectors - HTML5

Usage

A getting started guide on how to integrate Bitmovin Analytics Collector with the Bitmovin Player is available on our homepage.

For more comprehensive integration documentation please consult the Bitmovin Analytics documentation.

Integrating Bitmovin 8

Bitmovin Player v8 comes with Analtyics pre-installed and just requires an analytics section containing your license key in the player configuration.

A minimal example:

const configWithAnalytics = {
  key: '<YOUR PLAYER KEY>',
  analytics: {
    key: '<YOUR ANALYITICS KEY>',
    videoId: 'VIDEO_ID',
  },
};

const container = document.getElementById('my-player');
const player = bitmovin.player.Player(container, configWithAnalytics);

To ensure you are running a specific version (e.g. when including the bitmovin-analytics package from NPM) override the built-in analytics module:

Using script tag:

<script type="text/javascript" src="https://cdn.bitmovin.com/analytics/web/2/bitmovinanalytics.min.js"></script>;
bitmovin.player.Player.addModule(bitmovin.analytics.PlayerModule);

Using npm:

import {Player} from 'bitmovin-player/modules/bitmovinplayer-core';
import {PlayerModule as AnalyticsModule} from 'bitmovin-analytics';
Player.addModule(AnalyticsModule);

Integrating 3rd Party Players

To integrate other players pick the appropriate adapter (HlsAdapter, VideojsAdapter, ShakaAdapter, DashjsAdapter or HTMLVideoElementAdapter) and instantiate the adapter by passing the player instance.

An example for HLS.js:

const analyticsConfig = {
  key: '<YOUR ANALYITICS KEY>',
  videoId: 'VIDEO_ID',
};

const player = new Hls();
const analytics = new bitmovin.analytics.adapters.HlsAdapter(analyticsConfig, player);

player.loadSource('https://path.to/your/stream.m3u8');
player.attachMedia(document.getElementById('video'));

Before changing the video source in the player, you need to call sourceChange() on the associated analytics adapter. You can pass new configuration properties to this method like videoId or videoTitle

analytics.sourceChange({
  videoId: 'new-video-id',
  title: 'New Video',
});

// Load the new source into player