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

@mux/mux-react-native-player

v0.1.7

Published

Mux-owned React Native video player powered by Mux Player for iOS and Android.

Readme

Mux React Native Player

A React native video player with built-in Mux Data and Mux Robots integrations. Native playback is delegated to:

Documentation

Full guides live in docs/:

Requirements

  • React Native 0.75+ with Expo Modules
  • iOS 15+, Android minSdk 23+

Install

npm install @mux/mux-react-native-player
{
  "expo": {
    "plugins": [
      [
        "@mux/mux-react-native-player/plugin",
        { "enablePictureInPicture": true }
      ]
    ]
  }
}
npx expo prebuild
npx expo run:ios
npx expo run:android

Usage

import { MuxVideoView, useMuxVideoPlayer } from "@mux/mux-react-native-player";

export default function Player() {
  const player = useMuxVideoPlayer({
    playbackId: "qxb01i6T202018GFS02vp9RIe01icTcDCjVzQpmaB00CUisJ4",
    metadata: {
      envKey: "YOUR_MUX_DATA_ENV_KEY",
      playerName: "MuxReactNativePlayerExample",
      videoTitle: "Mux playback in React Native",
      viewerUserId: "user-123",
    },
  });

  return (
    <MuxVideoView
      player={player}
      controls="custom"
      contentFit="contain"
      style={{ width: "100%", aspectRatio: 16 / 9, backgroundColor: "black" }}
    />
  );
}

controls: "native" for platform controls, "custom" for the shared cross-platform JS controls, "none" for the bare video surface.

Source Options

type MuxVideoSource = {
  playbackId: string;
  assetId?: string;
  playbackToken?: string;
  drmToken?: string;
  customDomain?: string;
  minResolution?: "480p" | "540p" | "720p" | "1080p" | "1440p" | "2160p";
  maxResolution?: "720p" | "1080p" | "1440p" | "2160p";
  renditionOrder?: "default" | "desc";
  clipping?: { assetStartTime?: number; assetEndTime?: number };
  metadata?: {
    envKey?: string;
    playerName?: string;
    videoTitle?: string;
    videoId?: string;
    viewerUserId?: string;
    customData?: Record<string, string>;
  };
};
  • metadata.envKey enables Mux Data.
  • drmToken requires playbackToken.
  • The source is mutable — pass it from state and the player will reload when it changes.

Player Commands

await player.play();
await player.pause();
await player.seekTo(12);
await player.seekBy(10);
await player.replay();
await player.setMuted(true);
await player.setVolume(0.5);
await player.setLoop(true);
await player.setPlaybackRate(1.25);
player.replace({ playbackId: "NEW_PLAYBACK_ID" });
await player.release();

Mux Robots UI

When using controls="custom", you can add Mux Robots buttons (summary, chapters, key moments). Keep MUX_TOKEN_ID / MUX_TOKEN_SECRET on a backend and pass callbacks:

<MuxVideoView
  player={player}
  controls="custom"
  robots={{
    onSummarize: ({ assetId }) =>
      fetchJson("/mux/robots/summarize", { assetId }),
    onGenerateChapters: ({ assetId }) =>
      fetchJson("/mux/robots/chapters", { assetId }),
    onFindKeyMoments: ({ assetId }) =>
      fetchJson("/mux/robots/key-moments", { assetId }),
  }}
/>

Buttons appear only for actions with a callback. Chapters render as timeline markers; key moments render as highlighted ranges. Selecting either seeks to its start time.