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

proctoreye

v0.3.0

Published

ProctorEye browser SDK — webcam/screen capture, face detection, and violation reporting for embedding AI exam proctoring into your own site.

Readme

proctoreye

Browser SDK for ProctorEye — webcam/screen capture and violation reporting, embedded directly in your own exam/assessment page.

Your backend opens a session with POST /v1/sessions/start, then calls POST /v1/candidates/start with your apiKey (server-to-server — never expose the API key to a browser) and gets back a candidateToken. Hand that token to this SDK on the page itself.

Install

npm install proctoreye
import ProctorSDK from "proctoreye";

await ProctorSDK.start({
  candidateToken,        // from your backend's /v1/candidates/start call
  apiBaseUrl: "https://your-proctoreye-instance.example.com",
  captureConfig,         // pass through whatever /v1/candidates/start returned
});

// later, when the exam/assessment ends:
ProctorSDK.stop();

Named imports work too: import { start, stop } from "proctoreye".

More control than start()/stop()

start() covers "monitor everything automatically." These expose the same pieces it uses internally, for anyone who wants more control.

isActive() — is monitoring currently running?

import { isActive } from "proctoreye";

if (isActive()) {
  showRecordingBadge();
}

reportEvent(type, meta?) — report an event from your own UI logic

Reports one of the three browser-witnessed event types through the same candidate start() uses — useful if your own page has its own reason to believe one of these happened, instead of only relying on the SDK's automatic listeners. The server only accepts "tab_blur", "wrong_share_type", or "share_revoked" — it can't be used to fake an AI-only violation type. Throws if called before start().

import { reportEvent } from "proctoreye";

// e.g. your own custom UI detected the candidate navigated away
await reportEvent("tab_blur", { durationMs: 4200 });

getWebcamStream() / getEntireScreenStream() — build your own permission UI

The same functions start() calls internally, exposed directly — for a custom "allow camera" priming screen (e.g. show a live preview before the candidate commits) instead of start()'s single all-at-once prompt. getEntireScreenStream takes a callback that fires each time the candidate picks a tab/window instead of the entire screen — it keeps re-prompting until they pick "entire screen."

import { getWebcamStream, getEntireScreenStream } from "proctoreye";

const preview = document.querySelector("video");
const webcamStream = await getWebcamStream();
preview.srcObject = webcamStream; // show it before officially starting

const screenStream = await getEntireScreenStream(() => {
  alert("Please share your entire screen, not just a tab or window.");
});

No build step? Use the script tag instead

Same SDK, same API, zero install:

<script src="https://unpkg.com/proctoreye"></script>
<script>
  await ProctorSDK.start({ candidateToken, apiBaseUrl, captureConfig });
</script>

What it does

  • Requests webcam and/or screen access based on captureConfig (either can be off).
  • Rejects a tab/window screen-share and re-prompts until the entire screen is shared.
  • Uploads a frame from each active stream on a timer (captureConfig.aiIntervalSec).
  • Reports tab-switch and screen-share-revoked events immediately, not on the next tick.
  • stop() releases the camera/screen and stops all reporting — always call it when the monitored attempt ends.

See your ProctorEye dashboard's Settings page for the capture-interval and policy options captureConfig accepts.