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

@anorak-games/react-native-video-texture

v0.4.4

Published

Headless Expo video player that exposes decoded frames as WebGPU-compatible native textures.

Readme

@anorak-games/react-native-video-texture

NOTE: This is a very experimental package that is unlikely to be useful after 2026. It has known issues like leaking on disk cache, and it requires a very specific webgpu version + patch It exists mostly as a temporary bridge between react-native-webgpu's external texture feature and the fact that expo-video/skia did not support usage at time of creation. There is probably a better way to do this by now.

Headless Expo video playback that exposes decoded frames as native buffers for react-native-webgpu external textures.

Requirements

  • Expo 56 or newer and a development build; this module is not available in Expo Go.
  • [email protected] with the bundled patch described below.
  • iOS 16.4 or newer.
  • A physical Android device running API 29 or newer. Android emulators are not supported.

After installing or upgrading this package, regenerate and rebuild the native app with npx expo prebuild --clean followed by npx expo run:ios or npx expo run:android.

Install

npm install @anorak-games/react-native-video-texture [email protected]
npm install --save-dev patch-package

Set the consuming app's postinstall script to:

{
  "scripts": {
    "postinstall": "patch-package --error-on-fail --patch-dir node_modules/@anorak-games/react-native-video-texture/patches"
  }
}

The patch is tied to [email protected]. It releases the native external texture and source frame when GPUExternalTexture.destroy() is called (so the frame buffer returns to its producer immediately), surfaces native error messages to JS instead of Exception in HostFunction: <unknown>, acquires shared textures with a content-preserving image layout, and logs the driver-reported import properties once per process ([huntVideoColor] tag) for colour debugging. patches/dawn/ is reference material for upstream Dawn reports and is not applied to anything.

Apps using Expo prebuild should set the native minimum versions explicitly:

export default {
  ios: {
    deploymentTarget: '16.4',
  },
  plugins: [
    'react-native-webgpu',
    [
      'expo-build-properties',
      {
        android: {
          minSdkVersion: 29,
        },
      },
    ],
  ],
};

Usage

Request the native Dawn features alongside the application's other WebGPU features:

import {
  VIDEO_TEXTURE_DEVICE_FEATURES,
  isVideoTextureSupported,
  useVideoTexture,
} from '@anorak-games/react-native-video-texture';

const device = await adapter.requestDevice({
  requiredFeatures: [...VIDEO_TEXTURE_DEVICE_FEATURES],
});

useVideoTexture() returns a player and a worklet-capturable frame source. Load transport commands through the player, poll decoded frames from the frame source inside the render worklet, wrap each native handle with RNWebGPU.createVideoFrameFromNativeBuffer(), then import it with device.importExternalTexture().

Check isVideoTextureSupported() before entering a native video path. Importing the package is safe on web, but creating a player is not supported there.

Platform notes

  • Samples arrive as RGB on both platforms — Android converts decoder frames to RGBA8 on the GPU (GlVideoBridge, one blit per frame), iOS converts in Dawn's Metal sampler — so shaders need no colour conversion and no platform branches. GPUExternalTexture.yuvToRgbMatrix is the identity for every frame this module produces.
  • Android reports pixelFormat: 'bgra8' ('nv12' is accepted at construction as a legacy alias) and rejects rotated video.
  • Keep the external video texture and its sampler in bind group 0; place other resources in later bind groups.

Development

npm install
npm run build
npm test
npm pack --dry-run

After editing node_modules/react-native-webgpu, regenerate the bundled patch with:

npm run patch:webgpu

Releasing

Merge to main, then create a Github Release with appropriate version tag (ie v0.4.0), Github Action will publish from that.

Manual release via npm release:minor if you have credentials, but you should prefer the github flow.