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

@feralfile/play

v0.3.1

Published

Add a Play on Art Computer button to your website: pair a visitor's browser with their Feral File Art Computer and play a DP-1 playlist on it.

Readme

@feralfile/play

clients/session-recipient/js/ is @feralfile/play, the browser library websites embed to pair a visitor's browser with their Art Computer and play a DP-1 playlist on it. Internally it is the mint-pairing requester: the browser client that requests an ephemeral browser session from the Go token minter embedded in FF1 feral-controld.

npm i @feralfile/play

The published package ships compiled ESM + type declarations from dist/ (npm run build). Source stays TypeScript-first in src/.

Browser runtimes check localStorage under the current website origin for an existing ephemeral browser session. If one is missing or invalid, requestEphemeralSession joins a Mint Pairing Broker channel using a QR/deep-link payload or short code, sends an end-to-end encrypted mint_request with the origin derived from window.location.origin and browser/client metadata, polls for an encrypted minter result, validates the channel binding, stores the recovered token in origin-scoped storage when storage is enabled, and returns the session metadata. displayDp1Playlist uses that session to request DP1 playlist display through ff-relayer without exposing the relayer command envelope to website code. See Sequential Flow for the end-to-end model.

import {
  displayDp1Playlist,
  requestEphemeralSession
} from "@feralfile/play";

const session = await requestEphemeralSession({
  pairing: { qrPayload },
  browserInfo: { name: "Chrome", label: "Gallery wall browser" }
});

await displayDp1Playlist({
  session,
  playlist: dp1Playlist,
  // Fallback when the session carries no relayer URL; the host from Network endpoints.
  relayerBaseUrl: "https://tv-cast-coordination.autonomy-system.workers.dev"
});

Wrapped Pairing UI

For a standard integration, mount the provided Play on Art Computer button. It checks origin-scoped storage first, shows the pairing-code popup only when there is no valid local browser session, waits for mobile approval, and then sends the DP1 playlist to ff-relayer.

import { mountPlayOnArtComputerButton } from "@feralfile/play";

mountPlayOnArtComputerButton({
  container: "#play-on-art-computer",
  playlist: dp1Playlist,
  brokerBaseUrl: "https://handoff.feralfile.com",
  // Fallback when the session carries no relayer URL; the host from Network endpoints.
  relayerBaseUrl: "https://tv-cast-coordination.autonomy-system.workers.dev"
});

The relayer base URL arrives inside the approved session (session.relayerBaseUrl) and wins whenever it is there, so never hard-code a host in display code. The relayerBaseUrl option above is the fallback for a session that carries none — without it such a session fails with relayer base URL is required. A Content-Security-Policy also has to be written before any session exists, so connect-src needs the relayer origin up front: the Integration Guide lists the hosts to allow.

The popup instructs users to make sure the FF1 is open, open the Feral File mobile app, go to Settings -> Art Computers, select the FF1, and toggle Browser Pairing on. After the pairing code is entered, the popup switches to an approval state that asks the user to approve the browser session in the Feral File mobile app.

For custom UI, use createPairingCodeDialog, requestEphemeralSessionWithPairingUi, hasStoredEphemeralBrowserSession, and clearStoredEphemeralBrowserSession. The dialog accepts copy and class-name overrides so a website can keep its own styling while preserving the pairing sequence and approval handoff.

Commands

npm ci
npm run lint
npm run typecheck
npm test

Boundaries

  • Store browser session tokens only in origin-scoped browser storage.
  • Do not expose token values through logs, thrown errors, analytics, or public callbacks.
  • Use the token only for the intended ff-relayer display/cast path.
  • Keep API names requester-oriented rather than tied to a specific website.