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

@tirs/rewind

v0.2.11

Published

DOM-replay capture for the Tirs SDK: records the page with rrweb where screen recording is impossible (phones), and ships a bundle the Tirs viewer replays like a video.

Readme

@tirs/rewind

DOM-replay capture for the Tirs SDK — recording for devices that cannot screen-record.

Mobile browsers have no getDisplayMedia. There is no permission to ask for and no flag to set: the API does not exist, so a customer who opens a care link on their phone has nothing to record with. This package records the page itself instead, with rrweb, and produces a bundle the Tirs viewer replays like a video.

What it does

  • Records only where screen capture is impossible. Desktop keeps recording real video — this never competes with it.
  • Records across tabs. Every tab of the session runs a recorder, and the one the customer is actually looking at holds the "camera": switching tabs hands it over, so the replay follows them the way a screen recording would. A reload is just a hand-over to a new document, so it costs one cut rather than the recording.
  • Persists as it goes. Segments are gzipped into IndexedDB every 30 seconds, so a crash, an eviction or a navigation costs at most the segment in flight.
  • Redacts by default: inputs are masked and anything marked class="rr-block" is skipped.
  • Caps recordings at 2 minutes — shorter than video, because this runs on phones.

How to use

Off by default. It is the tenant's call: DOM capture is a materially different privacy and performance posture than log capture, and it should be switched on deliberately.

Script tag

Nothing to install. The runtime fetches this package's CDN artifact on its own, from the same version directory capture.js came from, and only on devices that will use it:

<script src="https://cdn.try-trs.com/v1/capture.js"
        data-tirs-key="YOUR-KEY"
        data-tirs-rewind="true"></script>

Bundler

npm i @tirs/rewind
import { init } from '@tirs/core';
import { care } from '@tirs/care';
import { rewind } from '@tirs/rewind';

init({ key: 'YOUR-KEY', rewind: true, plugins: [care(), rewind()] });

The implementation sits behind a dynamic import(), so your bundler splits rrweb into its own chunk. Nothing is fetched until a care session actually exists in the tab.

Making replays look right

A DOM replay re-fetches whatever could not be embedded at capture time. Three things account for nearly every replay that looks wrong:

  • Fonts. Serve font files with Access-Control-Allow-Origin. Without it the browser will not let us embed them, and the replay falls back to system fonts.
  • Auth-gated assets. Stylesheets and images behind a login replay blank. Anything the reviewer's browser cannot fetch, it cannot show.
  • Deliberate exclusions. Add class="rr-block" to regions that must never be captured.

Every bundle carries a fidelity manifest listing what the replay depends on fetching live, so when something does look wrong it is possible to see why rather than guess.

Size

~25 KB gzipped, almost all of it rrweb — larger than the entire capture runtime. That is why it is a separate package and a separate CDN artifact: a tenant who never enables it, and every desktop visitor of a tenant who does, pays nothing for it.

Licence

MIT