VDO.Ninja SDK — API Reference

Tip: avoid reserved SDK types (subscribe | unsubscribe | channelMessage) for custom protocols.

Constructor

const vdo = new VDONinjaSDK(options)

Connection

Publishing

Viewing

Quick Helpers

Data Communication

Pub/Sub

Utilities & Aliases

Events (Selected)

WHIP/WHEP Clients

Standalone clients for standard WebRTC-HTTP streaming protocols. Works independently of the VDO.Ninja P2P system.

WHIPClient (whip-client.js)

Publish media streams to WHIP-compatible endpoints (Twitch, Meshcast, Cloudflare, etc.)

const client = new WHIPClient(endpoint, options)

Methods:

Events: connecting, connected, icestate, connectionstate, error, disconnected, stopped

WHEPClient (whep-client.js)

Consume media streams from WHEP-compatible endpoints.

const client = new WHEPClient(endpoint, options)

Methods:

Events: connecting, connected, track, icestate, connectionstate, error, disconnected, stopped

Supported Services

See README and demos for examples.