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

@videodb/relay-node

v0.1.0

Published

VideoDB Relay Node SDK for local recording and live transcription in Electron applications

Downloads

30

Readme

VideoDB Desktop SDK

A Node.js SDK for local recording and live transcription in Electron applications. Capture meetings, screens, and audio with real-time transcription powered by VideoDB.

Installation

npm install @videodb/relay-node

Quick Start

const VideoDBDesktopSDK = require('@videodb/relay-node');

// 1. Initialize the SDK
await VideoDBDesktopSDK.init({ 
  apiUrl: 'https://api.videodb.io'
});

// 2. Request Permissions (macOS only)
await VideoDBDesktopSDK.requestPermission('microphone');
await VideoDBDesktopSDK.requestPermission('screen-capture');

// 3. Listen for Events
VideoDBDesktopSDK.addEventListener('meeting-detected', async (evt) => {
  console.log('Meeting detected:', evt.window.title);
  
  // Start recording with session token from your backend
  await VideoDBDesktopSDK.startRecording({
    sessionId: 'unique-session-id',
    sessionToken: 'session-token-from-backend',
    config: { transcription: { enabled: true } }
  });
});

// 4. Handle Real-time Transcripts
VideoDBDesktopSDK.addEventListener('transcript-segment', (data) => {
  console.log(`[${data.speaker}]: ${data.text}`);
});

Usage

Initialization

Initialize the SDK at application startup:

await VideoDBDesktopSDK.init({
  apiUrl: 'https://api.videodb.io',  // Your VideoDB API endpoint
  dev: false                          // Set true to use mock binary for testing
});

Permissions (macOS)

On macOS, request system permissions before recording:

await VideoDBDesktopSDK.requestPermission('microphone');
await VideoDBDesktopSDK.requestPermission('screen-capture');
await VideoDBDesktopSDK.requestPermission('accessibility');

Listen for permission status:

VideoDBDesktopSDK.addEventListener('permission-status', (evt) => {
  console.log(`${evt.permission}: ${evt.status}`);
});

Starting a Recording

Obtain a session token from your backend, then start recording:

await VideoDBDesktopSDK.startRecording({
  sessionId: 'session-123',           // Required: Unique session identifier
  sessionToken: 'session-token',          // Required: Auth token from backend
  callbackUrl: 'https://...',         // Optional: Webhook URL for upload events
  config: {                           // Optional: Recording configuration
    transcription: { enabled: true }
  }
});

Stopping a Recording

await VideoDBDesktopSDK.stopRecording('session-123');

Pausing and Resuming Tracks

Temporarily mute audio or video streams during a recording without stopping the session:

// Pause the microphone
await VideoDBDesktopSDK.pauseTracks({ tracks: ['mic'] });

// Pause system audio and screen
await VideoDBDesktopSDK.pauseTracks({ tracks: ['system_audio', 'screen'] });

// Resume tracks
await VideoDBDesktopSDK.resumeTracks({ tracks: ['mic', 'system_audio', 'screen'] });

Valid track types: mic, system_audio, screen

Note: These commands only affect the active recording. Use them when you need to temporarily mute specific inputs (e.g., during a private conversation) without stopping the entire recording session.

Cleanup

Gracefully shutdown the SDK when your app closes:

await VideoDBDesktopSDK.shutdown();

API Reference

Methods

| Method | Parameters | Description | |--------|------------|-------------| | init(options) | { apiUrl, dev? } | Initialize the SDK and spawn the native binary | | requestPermission(type) | 'microphone' \| 'screen-capture' \| 'accessibility' | Request system permissions (macOS) | | startRecording(options) | { sessionId, sessionToken, callbackUrl?, config? } | Start a recording session | | stopRecording(sessionId) | string | Stop the recording and trigger upload | | pauseTracks(options) | { tracks: string[] } | Pause specific tracks (mic, system_audio, screen) | | resumeTracks(options) | { tracks: string[] } | Resume specific tracks (mic, system_audio, screen) | | shutdown() | - | Gracefully terminate the SDK | | addEventListener(event, callback) | string, Function | Subscribe to SDK events | | removeEventListener(event, callback) | string, Function | Unsubscribe from SDK events |

Events

| Event | Payload | Description | |-------|---------|-------------| | meeting-detected | MeetingDetectedEvent | Meeting window detected | | permissions-granted | {} | All required permissions granted | | permission-status | { permission, status } | Permission status update | | recording-started | { sessionId } | Recording started successfully | | transcript-segment | { sessionId, text, speaker } | Real-time transcription segment | | recording-stopped | { sessionId } | Recording stopped | | recording-complete | { sessionId, uploadId } | Upload completed | | error | { type, message } | Error occurred |

meeting-detected Reference Payload

The meeting-detected event contains detailed information about the active meeting window. Here is the standardized schema:

{
  "platform": "google_meet",
  "meetingID": "eve-fnjm-wkv",
  "meetingURL": "https://meet.google.com/eve-fnjm-wkv",
  "timestamp": "2025-12-19T10:33:06.744Z",
  "started_at": "2025-12-19T10:33:06.744Z",
  "uiState": {
    "participantCount": 1,
    "micMuted": true
  },
  "window": {
    "title": "Meet – eve-fnjm-wkv",
    "ownerBundleID": "com.google.Chrome",
    "bounds": { "x": 1795, "y": 25, "width": 1728, "height": 995 }
  }
}

Backend Integration

Session Tokens

Your backend must generate session tokens by calling the VideoDB API. Never hardcode API keys in your Electron app.

Webhooks (Optional)

Provide a callbackUrl in startRecording() to receive server-side notifications:

  • sdk_upload.uploading - Upload started
  • sdk_upload.complete - Upload finished successfully
  • sdk_upload.failed - Upload failed

Note: Real-time events (like transcription) are delivered directly to the SDK via addEventListener, not to the webhook.

Development

For contributors and binary implementers, see CONTRIBUTING.md for:

  • Project architecture
  • Binary protocol specification
  • Testing with mock binary
  • Release process