@probecheck/probe-engine
v0.0.1
Published
Browser-based device diagnostics engine — test webcam, microphone, keyboard, screen, mouse, speakers, and more. Zero dependencies, privacy-first.
Maintainers
Readme
@probecheck/probe-engine
Browser-based device diagnostics engine — test webcam, microphone, keyboard, screen, mouse, speakers, and more. Zero dependencies, privacy-first.
Part of ProbeCheck.
Features
| Module | What it tests |
|--------|---------------|
| webcam | Resolution, FPS, video quality, device enumeration |
| microphone | Volume, sample rate, noise floor, input quality |
| keyboard | All keys, N-key rollover, ghosting, response time |
| screen | Resolution, DPR, HDR, dead pixel detection |
| mouse | Buttons, scroll, polling rate estimation |
| speaker | Audio output availability, test tone generation |
| gamepad | Buttons, axes, haptic feedback |
| touch | Touch events, multi-touch, gesture support |
| webgl | GPU vendor, renderer, capabilities |
| network | Download speed, jitter, packet loss, latency |
| latency | Input latency measurement |
| polling | Mouse polling rate estimation |
| audio-frequency | Audio frequency sweep, tone generation |
Install
npm install @probecheck/probe-engineUsage
import { webcamProbe, microphoneProbe, keyboardProbe } from "@probecheck/probe-engine";
// Run a webcam test
const result = await webcamProbe.run();
console.log(result.status); // "pass" | "fail" | "warning" | "unsupported"
console.log(result.details); // { width, height, fps, devices, ... }
// Run a microphone test
const micResult = await microphoneProbe.run();
console.log(micResult.details); // { sampleRate, volume, noiseFloor, ... }
// Check if a feature is supported before testing
if (keyboardProbe.isSupported()) {
const kbResult = await keyboardProbe.run();
}API
Every probe module follows the ProbeModule interface:
interface ProbeModule {
type: string;
isSupported: () => boolean;
run: (options?: ProbeOptions) => Promise<ProbeResult>;
stop: () => void;
}
interface ProbeResult {
type: string;
status: "pass" | "fail" | "warning" | "unsupported";
summary: string;
details: Record<string, unknown>;
hints?: ProbeHint[];
timestamp: number;
duration: number;
precision: "high" | "medium" | "low" | "estimate";
}Options
interface ProbeOptions {
timeout?: number; // Timeout in ms (default: 10000)
onProgress?: (data: unknown) => void; // Progress callback
}Built-in Scenarios
import { scenarios, getProbeModule } from "@probecheck/probe-engine";
// Get probe types for a scenario
const videoCallProbes = scenarios["video-call"];
// → ["webcam", "microphone", "speaker", "network"]
// Run all probes in a scenario
for (const type of videoCallProbes) {
const probe = getProbeModule(type);
if (probe?.isSupported()) {
const result = await probe.run();
console.log(`${type}: ${result.status}`);
}
}Available scenarios: video-call, laptop, streaming, gaming, full, audio.
Browser Support
Requires modern browser APIs:
navigator.mediaDevices.getUserMedia(webcam, microphone)KeyboardEvent/KeyboardAPI (keyboard)ScreenAPI (screen)AudioContext(speaker, audio-frequency)GamepadAPI (gamepad)WebGLAPI (webgl)NetworkInformationAPI (network)
Works in Chrome 90+, Edge 90+, Firefox 90+, Safari 15+. Older browsers may have partial support.
Privacy
All tests run entirely in the browser. No data is sent to any server. This package has zero telemetry.
License
MIT
