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

arch_ang_paul

v0.1.35

Published

Cross-platform DRM video player SDK for React Native with online and offline playback.

Readme

arch_ang_paul

arch_ang_paul is a cross-platform React Native DRM video player SDK for Android and iOS. It exposes the ArchAngPaulPlayer component, the promise-based ArchAngDownloader API, TypeScript definitions, Expo config plugin support, old architecture autolinking, and a new-architecture codegen contract.

The native foundation uses Kotlin + ExoPlayer Media3 on Android and Swift + AVFoundation on iOS. The SDK is designed for React Native 0.64+, Hermes, Android API 23+, and iOS 13+.

Installation

npm install arch_ang_paul
cd ios && pod install

For Expo prebuild projects:

{
  "expo": {
    "plugins": [
      [
        "arch_ang_paul",
        {
          "android": {
            "usesCleartextTraffic": false
          },
          "ios": {
            "allowsAirPlay": true,
            "allowsArbitraryMediaLoads": false
          }
        }
      ]
    ]
  }
}

Basic Usage

import React from 'react';
import { ArchAngPaulPlayer, ArchAngDownloader } from 'arch_ang_paul';

export function MovieScreen() {
  return (
    <ArchAngPaulPlayer
      source={{
        uri: 'https://domain.com/movie.mpd',
        type: 'dash',
      }}
      drm={{
        type: 'widevine',
        licenseUrl: 'https://license.domain.com/',
        headers: {
          Authorization: 'Bearer TOKEN',
        },
      }}
      controls
      offline
      watermark={{
        text: 'USER123',
        dynamic: true,
        interval: 20,
      }}
    />
  );
}

Android Setup

The Android implementation is written in Kotlin and uses Media3:

  • media3-exoplayer, media3-exoplayer-dash, media3-exoplayer-hls
  • DefaultDrmSessionManager, HttpMediaDrmCallback, OfflineLicenseHelper
  • DownloadService for foreground offline downloads
  • MediaSession for Android TV, lock screen controls, headset controls, and background integration
  • FLAG_SECURE, root checks, and emulator checks for secure playback

Minimum supported SDK is API 23. Host apps should compile with Android SDK 35 or newer.

If your app has a custom manifest, keep these permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

iOS Setup

The iOS implementation is written in Swift and uses:

  • AVPlayer, AVPlayerLayer, and AVFoundation
  • AVAssetResourceLoaderDelegate for FairPlay license requests
  • AVAssetDownloadURLSession for offline asset downloads
  • AirPlay and Picture in Picture through system AVKit APIs
  • screen recording detection and jailbreak checks

iOS 13 or newer is required. The podspec links AVFoundation, MediaPlayer, and UIKit.

DRM Setup

Widevine

drm={{
  type: 'widevine',
  licenseUrl: 'https://license.domain.com/widevine',
  headers: {
    Authorization: `Bearer ${jwt}`,
    'X-Device-ID': deviceId,
  },
  jwt,
  tokenRefreshUrl: 'https://api.domain.com/playback/token',
  tokenRefreshInterval: 900,
  offlineLicense: true,
  deviceBinding: true,
}}

Android supports Widevine L1/L3 depending on device capabilities and license policy. Your license server controls entitlement, robustness rules, key duration, renewal, and HDCP restrictions.

FairPlay

drm={{
  type: 'fairplay',
  certificateUrl: 'https://license.domain.com/fps.cer',
  licenseUrl: 'https://license.domain.com/fairplay',
  contentId: 'movie-123',
  headers: {
    Authorization: `Bearer ${jwt}`,
  },
  offlineLicense: true,
}}

FairPlay requires an Apple FPS certificate, an SPC-to-CKC license endpoint, and backend-specific content ID handling. The native ArchAngPaulFairPlayManager is the integration point for that exchange.

Offline Example

const download = await ArchAngDownloader.download({
  id: 'movie-123',
  source: {
    uri: 'https://domain.com/movie.mpd',
    type: 'dash',
  },
  drm: {
    type: 'widevine',
    licenseUrl: 'https://license.domain.com/widevine',
    headers: { Authorization: 'Bearer TOKEN' },
    offlineLicense: true,
  },
  quality: '1080p-60',
  title: 'Movie 123',
});

ArchAngDownloader.addProgressListener((event) => {
  console.log(event.id, event.state, event.progress);
});

await ArchAngDownloader.pause('movie-123');
await ArchAngDownloader.resume('movie-123');
await ArchAngDownloader.delete('movie-123');

Custom Controls Example

const player = useRef<ArchAngPlayerControls>(null);

<ArchAngPaulPlayer ref={player} source={source} controls={false} />;

<Button title="Play" onPress={() => player.current?.play()} />;
<Button title="+10" onPress={() => player.current?.forward(10)} />;
<Button title="PiP" onPress={() => player.current?.enterPictureInPicture()} />;

API Documentation

ArchAngPaulPlayer

Important props:

  • source: { uri, type } where type is dash, hls, mp4, live, or vod
  • drm: Widevine, FairPlay, or multi-DRM license configuration
  • controls: enables built-in controls
  • offline: enables offline-aware playback
  • watermark: text, user ID, email, mobile, dynamic movement, opacity, and custom style
  • secureSurface: enables screenshot and screen recording protections where the OS allows
  • allowCasting: enables Chromecast, Android TV, AirPlay, and Apple TV pathways
  • allowPictureInPicture: enables PiP on supported OS versions

Imperative methods:

  • play, pause, stop, replay, seek
  • forward, backward
  • fullscreen, minimize, lockControls
  • setQuality, setAudioTrack, setSubtitleTrack, setSubtitleStyle
  • setPlaybackSpeed, enterPictureInPicture, getAnalytics

Events:

  • onLoad, onPlay, onPause, onEnd, onError
  • onBuffer, onSeek, onProgress
  • onQualityChange, onAudioChange, onSubtitleChange
  • onDRMError, onDownloadProgress

ArchAngDownloader

Promise methods:

  • download(request)
  • pause(id)
  • resume(id)
  • cancel(id)
  • delete(id)
  • get(id)
  • list()
  • storageUsage()
  • addProgressListener(listener)

Supported Quality Labels

  • Auto
  • 8K
  • 4K 120fps, 4K 60fps, 4K 30fps
  • 1080p 120fps, 1080p 60fps, 1080p 30fps
  • 720p, 480p, 360p, 240p

Security Notes

Android uses FLAG_SECURE, root detection, emulator detection, Widevine robustness, and Media3 DRM callbacks. iOS detects screen capture and jailbreak indicators. These checks harden playback, but DRM security ultimately depends on license policy, device trust, backend entitlement checks, and key lifetime.

Development

npm install
npm run typecheck
npm test
npm run build

The example app lives in example/.