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

@streamiq/plugin-drm

v1.1.0

Published

DRM plugin for Streamq DASH playback (Shaka license server wiring).

Readme

@streamiq/plugin-drm

Optional DRM registration for MPEG-DASH playback via Shaka (@streamiq/dash). Maps Widevine / FairPlay / PlayReady license endpoints to Shaka drm.servers without putting DRM logic in @streamiq/core.

Stable 1.0.0. Peers: @streamiq/core, @streamiq/dash.

Install

npm install @streamiq/core @streamiq/dash @streamiq/plugin-drm

Usage

import { Player } from '@streamiq/core';
import { createDashPlaybackAdapter } from '@streamiq/dash';
import { DRMPlugin } from '@streamiq/plugin-drm';

const video = document.querySelector('video')!;

const player = new Player({
  target: video,
  plugins: [
    new DRMPlugin({
      widevine: { licenseUrl: 'https://your-license-proxy/widevine' },
      fairplay: { licenseUrl: 'https://your-license-proxy/fairplay' },
      playready: { licenseUrl: 'https://your-license-proxy/playready' },
    }),
  ],
  createPlaybackAdapter: createDashPlaybackAdapter,
});

await player.load({ src: 'https://example.com/encrypted.mpd', type: 'dash' });

Features

| Feature | Detail | |---------|--------| | Multi-DRM | Register Widevine, FairPlay, PlayReady in one plugin | | Shaka mapping | Pure buildShakaDrmServers(config) → Shaka drm.servers | | No secrets in SDK | You supply license URLs; never log tokens or signed URLs | | DASH only | Progressive / HLS-only playback ignores DRM registration |


Public API

| Export | Description | |--------|-------------| | DRMPlugin | Plugin class | | DRM_PLUGIN_NAME | '@streamiq/plugin-drm' | | DrmPluginConfig | Plugin configuration type | | WidevineDrmConfig, FairplayDrmConfig, PlayreadyDrmConfig | Per-OEM config | | buildShakaDrmConfig(config) | Rich Shaka DRM config for DASH adapter integration | | buildShakaDrmServers(config) | Pure helper for Shaka config | | SHAKA_WIDEVINE_KEY_SYSTEM | Key system id constant | | SHAKA_FAIRPLAY_KEY_SYSTEM | Key system id constant | | SHAKA_PLAYREADY_KEY_SYSTEM | Key system id constant |


Configuration

new DRMPlugin({
  widevine: {
    licenseUrl: 'https://license.example.com/widevine',
    headers: {
      Authorization: 'Bearer short-lived-token',
    },
    withCredentials: true,
    // optional serverCertificate / prepareLicenseRequest / parseLicenseResponse
  },
  fairplay: {
    licenseUrl: 'https://license.example.com/fairplay',
  },
});

Shaka selects the appropriate key system for the manifest.

License URLs must use https, except for http://localhost style development setups.


Security

  • Never log license URLs, auth tokens, or signed query strings
  • Keep license proxy on your backend — client receives short-lived URLs only
  • This plugin performs no logging of sensitive data

Requirements

  • Encrypted DASH via @streamiq/dash (Shaka Player)
  • Browser with required CDM for target DRM system

Bundle size

| Budget | Limit | |--------|-------| | Full plugin | 4 kB gzipped (Shaka external) |

License

MIT