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

@realeye-io/realtesting-screen-capture

v1.0.3

Published

Screen capture emulation via getDisplayMedia for automated testing

Readme

@realeye-io/realtesting-screen-capture

Deterministic screen capture emulation (navigator.mediaDevices.getDisplayMedia) for automated browser testing.

This package is part of the RealTesting suite from RealEye.io. It provides a proxy-style wrapper around getDisplayMedia that returns virtual MediaStream objects — no interactive browser prompts required.

RealEye feature: Screen Recording

Installation

npm install @realeye-io/realtesting-screen-capture

Quick Start

import { RealScreenCapture } from '@realeye-io/realtesting-screen-capture';

// Install the emulator
RealScreenCapture.install();

// Now use the standard API — it works without browser prompts
const stream = await navigator.mediaDevices.getDisplayMedia({ video: true });

Modes

| Mode | Behavior | |------|----------| | virtual | Always return virtual stream (default) | | native | Always delegate to real getDisplayMedia | | prefer-virtual | Try virtual first, fall back to native | | prefer-native | Try native first, fall back to virtual |

Permission Control

| Setting | Behavior | |---------|----------| | allow | Permission is always granted | | prompt | Block until a test responds via the test API | | deny | Permission is always denied |

Virtual Frame Sources

Virtual display streams can render content from multiple sources:

// Blank color frame
{ type: "blank", color: "#1a1a2e", text: "Virtual Display" }

// From an image element
{ type: "image", element: myImage }

// From a video element
{ type: "video", element: myVideo }

// Custom callback (draw each frame)
{ type: "callback", draw: (ctx, info) => { /* draw to canvas 2D context */ } }

Demo App

A fully functional demo is available in this repository:

git clone https://github.com/RealEye-io/realtesting-open.git
cd realtesting-open
npm install
npm run dev:screen  # https://localhost:4175

Test API

When test mode is enabled (?realtestingTest=1 or via config), the test API is available at window.__realtestingTestApi:

// Configure via test API
await window.__realtestingTestApi.configure({
  captureMode: "virtual",
  virtualPermission: "prompt",
  permissionPromptMode: "manual"
});

// Respond to pending permission prompts
const prompt = await window.__realtestingTestApi.waitForPermissionPrompt();
await window.__realtestingTestApi.respondToPermissionPrompt(prompt.id, true);

Realistic Timing

Enable simulated latency for hardware-like async behavior:

window.__REALTESTING_TIMING_CONFIG__ = { profile: "ciRealistic" };

Resources

| Resource | Link | |----------|------| | RealTesting monorepo | GitHub | | Full documentation | README.md | | npm page | npmjs | | Issues | GitHub Issues | | License | MIT |