The Web Without Servers

Cross-Platform P2P SDK for Web, Node.js, Python & Mobile. Zero Infrastructure. Unlimited Possibilities.

VDO.Ninja SDK enables websites to talk directly to each other. Stream HD video to friends, remote control applications from anywhere, build AI bots with live feeds, or create high-bandwidth apps with zero server costs. No accounts. No hosting.

🌐 Website-to-Website Direct
🎮 Remote Control Anything
🎵 Stream Media P2P
🤖 AI with Live Video/Audio
A revolutionary approach to web development that breaks the server stranglehold

🚀 Try It Live - No Setup Required

Experience true P2P messaging right here. Two independent peers that can connect and chat directly through your browser.

👤 Peer 1

Not connected
Stream ID: -
Viewing: -

👤 Peer 2

Not connected
Stream ID: -
Viewing: -
Room: - | Connect both peers to start chatting

This demo uses just these few lines:

// Setup
const vdo = new VDONinjaSDK();
vdo.addEventListener('dataReceived', (e) => displayMessage(e.detail.data));

// Connect and announce yourself
await vdo.connect();
await vdo.joinRoom({ room: "demo-room" });
await vdo.announce({ streamID: "myPeerID" });

// View another peer to establish P2P connection
await vdo.quickView({ streamID: "otherPeerID", dataOnly: true });

// Send messages
vdo.sendData({ message: "Hello P2P!" });

The Server-Free Revolution

What if websites could talk directly to each other?

For decades, web applications have been trapped in a client-server model. Every message, every byte of data, every interaction must pass through a server you pay for, maintain, and scale.

VDO.Ninja SDK breaks this paradigm.

Now, browsers can establish direct, encrypted connections to each other. No middleman. No monthly bills. No data limits. Just pure peer-to-peer communication at the speed of your internet connection.

Real-World Magic

🎬 Remote Control OBS from Anywhere

Control your streaming setup from your phone, no port forwarding, no VPN, no TeamViewer. Just open a webpage.

💸 Free Services That Couldn't Exist

Like Social Stream Ninja - handles massive chat traffic for free because P2P makes server costs disappear.

🎵 Stream Music to Friends

Share your Spotify, game audio, or live DJ set directly. No upload bandwidth limits, no server costs.

🎮 Multiplayer Games Without Servers

Build real-time games where players connect directly. Lower latency than any server could provide.

🤖 AI Assistants with Live Vision

Give AI bots eyes and ears. Process video/audio in real-time without expensive cloud infrastructure.

📹 Security Cameras Without Cloud

Stream directly from camera to viewer. No monthly fees, no privacy concerns, no storage limits.

🏢 Corporate Apps Without IT

Deploy internal tools that work anywhere, no VPN required, no server maintenance, instant global access.

🏠 LAN File Sharing & Streaming

Share files or stream media to devices on your local network at gigabit speeds. WebRTC detects LAN peers and keeps traffic local - no internet bandwidth used!

Already powering disruptive applications. This is the foundation for a new kind of web.

Start Building the Future

The Power of True P2P

💰

Zero Infrastructure Costs

No servers to rent, no bandwidth to pay for, no scaling concerns. Your users' browsers do all the work.

Lowest Possible Latency

Direct connections mean data travels the shortest path. When peers are on the same LAN, data stays local - no internet required!

🔐

End-to-End Encrypted

Military-grade encryption on every connection. No middleman. No logs. What happens P2P, stays P2P.

🌍

Works Everywhere

Behind firewalls, across continents, on mobile. If it has a browser, it can connect.

🚫

No Accounts Required

No sign-ups, no API keys, no quotas. Just pick a room name and start communicating.

Unlimited Bandwidth

Stream 4K video, transfer gigabytes. You're only limited by your users' internet connections.

Quick Start

Option 1: Simple IFRAME API

For basic P2P data transfer, you can use the IFRAME API without any SDK:

<iframe id="vdo" src="https://vdo.ninja/?room=my_room&dataonly"></iframe>
<script>
// Listen for data
window.addEventListener('message', (e) => {
    if (e.data.dataReceived) console.log('Received:', e.data.dataReceived);
});
// Send data
iframe.contentWindow.postMessage({ sendData: { msg: "Hello!" }}, '*');
</script>

Option 2: Full SDK (More Control)

For advanced features, custom UI, and full control:

1. Include the SDK

For Browsers:

<script src="https://cdn.jsdelivr.net/gh/steveseguin/ninjasdk@latest/vdoninja-sdk.min.js"></script>

For Node.js:

npm install ws @roamhq/wrtc  # or node-datachannel
# Then in your code:
const VDONinjaSDK = require('./vdoninja-sdk-node.js');

See README-NODE.md for detailed Node.js setup instructions.

2. Basic Data Channel Example

// Create a new VDO.Ninja SDK instance
const vdo = new VDONinjaSDK();

// Set up data channel handling
vdo.addEventListener('data', (event) => {
    const { data, uuid } = event.detail;
    console.log(`Received from ${uuid}:`, data);
});

// Connect, join room, and announce
await vdo.connect();
await vdo.joinRoom({ room: "myroom" });
await vdo.announce({ streamID: "ai-bot-1" });

// Send data to all peers
vdo.sendData({
    type: "chat",
    message: "Hello from AI bot!"
});

3. Audio/Video Example

// Create instance for audio/video
const vdo = new VDONinjaSDK();

// Set up track handling
vdo.addEventListener('track', (event) => {
    const { track, streams, uuid } = event.detail;
    const video = document.getElementById('remoteVideo');
    if (!video.srcObject) {
        video.srcObject = new MediaStream();
    }
    video.srcObject.addTrack(track);
});

// Get user media
const stream = await navigator.mediaDevices.getUserMedia({
    audio: true,
    video: true
});

// Connect, join room, and publish
await vdo.connect();
await vdo.joinRoom({ room: "videoroom" });
await vdo.publish(stream, { room: "videoroom" });

Live Examples

💬 Social Stream Ninja Integration

Two-way live chat with all major social media platforms in one unified stream

🌐 Supported Platforms

Twitch YouTube TikTok Kick X (Twitter) Facebook Discord Instagram And more...

🚀 Simple Integration

// Connect to Social Stream Ninja
const sdk = new VDONinjaSDK({
    host: 'wss://wss.socialstream.ninja',
    room: 'your-session-id',  // Note: SSN calls this "session ID"
    password: false
});

// Receive live chat from all platforms
sdk.on('dataReceived', (event) => {
    const data = event.detail?.data || event.data;
    if (data?.overlayNinja) {
        console.log(`[${data.overlayNinja.type}] ${data.overlayNinja.chatname}: ${data.overlayNinja.chatmessage}`);
    }
});

// Connect as a dock client
await sdk.connect();
await sdk.joinRoom();
await sdk.view('your-session-id', { audio: false, video: false, label: "dock" });

📊 Use Cases

  • Stream overlays with unified chat
  • Chat moderation across all platforms
  • Analytics and sentiment analysis
  • Interactive chat games and polls
  • Automated responses and chat bots

🤖 AI/LLM Integration

Complete SDK Knowledge for Vibe Coders

Everything your AI needs to know about VDO.Ninja SDK in one document

📄 View Full Document
Complete API reference with examples
Ready-to-use code patterns
AI-specific implementation guides
No authentication required

Quick Example for Your AI:

// Minimal AI Bot Setup
const vdo = new VDONinjaSDK();
vdo.onDataMessage = (data, uid) => {
    // AI processes incoming data
    const response = processWithAI(data);
    vdo.sendDataTo(uid, response);
};
await vdo.connect({ 
    roomid: "ai-bot", 
    push: true, 
    view: true, 
    datamode: 1  // Data only, no media
});

Documentation

Core Concepts

  • Rooms: Virtual spaces where peers connect
  • Push/View: Push to send, View to receive
  • Data Channels: Low-latency P2P data transfer
  • Mesh Networks: Every peer can connect directly to every other peer
  • End-to-End Encryption: All data is encrypted between peers using DTLS/SRTP
  • LAN-Aware: WebRTC automatically detects and uses local network paths when peers are on the same LAN
  • Handshake Server: Minimal WebSocket server that only facilitates initial WebRTC connection setup
  • Serverless Philosophy: After handshake, all communication is P2P - no state management, no data relay
  • SDK Only: Direct handshake server access is prohibited - always use the SDK

Connection Flow

// 1. Connect to signaling server
await vdo.connect();

// 2. Join a room
await vdo.joinRoom({ 
    room: "myroom",
    password: "optional" 
});

// 3a. Publish media stream
const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true });
await vdo.publish(stream, { streamID: "custom-id" });

// 3b. OR announce as data-only
await vdo.announce({ streamID: "bot-1" });

// 4. View other streams
await vdo.view("streamID", { audio: true, video: true });

Event Listeners

// SDK extends EventTarget - use addEventListener
vdo.addEventListener('connected', (event) => {
    console.log('Connected to server');
});

vdo.addEventListener('track', (event) => {
    const { track, uuid, streamID } = event.detail;
    console.log('Track received:', track.kind);
});

vdo.addEventListener('data', (event) => {
    const { data, uuid } = event.detail;
    console.log('Data received:', data);
});

vdo.addEventListener('error', (event) => {
    console.error('Error:', event.detail.error);
});

Alternatives

VDO.Ninja IFRAME API: For simpler web-only integration where cross-domain use is allowed.

Platform-Specific: Flutter app for mobile, Raspberry Ninja for Python SDK support, Node.js support available (see README-NODE.md).

🎯 Built-in Compatibility with VDO.Ninja

Your SDK Apps Work with VDO.Ninja Out of the Box!

Every app you build with the SDK is automatically compatible with the entire VDO.Ninja ecosystem. This means you get:

🎨

Pre-Built Professional UI

Use VDO.Ninja's polished interface to invite guests, manage rooms, and control settings - no UI development needed.

🎬

Free Video Mixer & Layouts

Access VDO.Ninja's director view with multi-camera switching, scene layouts, and professional mixing tools.

📹

OBS Studio Integration

Stream your SDK app directly into OBS using VDO.Ninja's proven integration - perfect for Twitch, YouTube, etc.

⏺️

Cloud Recording Options

Record to your own server or use VDO.Ninja's recording features for next-gen multimedia experiences.

Real Example: Social Stream Ninja

The Challenge: Social Stream Ninja handles massive amounts of real-time chat data from multiple platforms. Using traditional WebSockets would cost thousands in server bandwidth.

The Solution: By using VDO.Ninja's P2P infrastructure, Social Stream routes chat data directly between streamers and their tools. The handshake cost is insignificant compared to relaying all that data through servers.

The Result: A completely free service that would be financially impossible with traditional architecture. This is the power of P2P - turning expensive impossibilities into free realities.

Build your app with the SDK, and instantly tap into VDO.Ninja's proven ecosystem

Frequently Asked Questions

Do I need to run my own server?

No! The SDK uses our free handshake server to establish WebRTC connections. After the initial handshake, all communication is peer-to-peer. You don't need any server infrastructure.

Is it really free?

Yes, completely free. No hidden costs, no premium tiers. The P2P architecture means minimal server costs which we cover. Please respect the usage guidelines to keep it free for everyone.

How is this different from Socket.io or WebSockets?

WebSockets require a server to relay all messages. VDO.Ninja SDK creates direct P2P connections between browsers, resulting in lower latency and no server costs.

What about firewalls and NAT?

We provide free TURN servers that help establish connections even through restrictive firewalls and NAT. It works in most network environments.

Can AI bots use this without human intervention?

Absolutely! No CAPTCHA, no email verification, no accounts. Just connect with a room ID and start communicating. Perfect for automated systems.

What's the latency like?

Since it's P2P, latency is typically just the network distance between peers - often under 50ms for users in the same region, compared to 100-200ms+ for server-relayed solutions. When peers are on the same LAN, latency can be under 1ms!

How many peers can connect?

Rooms are limited to ~80 total connections. For full mesh networks: ~5-10 peers optimal. For broadcast mode: 50+ viewers. Viewer connections to a stream may also be limited. Higher limits available on request.

Is it secure?

Yes. All P2P connections use DTLS encryption by default. Data channels are end-to-end encrypted. No data passes through our servers after connection establishment.

Can I use this commercially?

Yes! The AGPLv3 license allows commercial use. You must share any modifications to the SDK itself, but your application code remains yours.

What platforms are supported?

Browsers: Chrome/Edge 80+, Firefox 75+, Safari 14+. Mobile browsers with WebRTC support.

Node.js: Full support with WebRTC implementations. See README-NODE.md.

Python: SDK available via Raspberry.Ninja.

Mobile: Flutter sample app at vdon_flutter.

Can I self-host the handshake-server?

In upcoming versions of the SDK, there will be support for self-hosting.

Does it work on local networks without internet?

Yes! If two peers are on the same LAN, data flows directly between them locally - no internet bandwidth used!

How VDO.Ninja SDK Compares

Feature VDO.Ninja SDK Socket.io Firebase WebRTC (raw)
Server Required ❌ No (P2P) ✅ Yes ✅ Yes (Cloud) ❌ No
Setup Complexity Simple (5 lines) Moderate Moderate Complex
Latency Lowest (P2P) Higher (Server relay) Higher (Cloud relay) Lowest (P2P)
Cost Free Server costs Usage-based pricing Free
Audio/Video ✅ Built-in ❌ No ❌ No ✅ Yes
Data Channels ✅ Built-in ✅ Yes ✅ Yes ✅ Yes
NAT Traversal ✅ Automatic N/A N/A Manual setup
AI Bot Friendly ✅ Designed for it ⚠️ Needs auth setup ⚠️ Needs auth setup ⚠️ Complex

Value Proposition Checklist

✓ Zero server costs for end users
✓ No user registration or authentication required
✓ End-to-end encrypted by default
✓ Works without SSL for local/development use
✓ AI bot friendly - no CAPTCHA or human verification
✓ Automatic NAT traversal and firewall bypassing
✓ Scales horizontally with P2P architecture
✓ Battle-tested in production with VDO.Ninja
✓ Active development and community support
✓ Multiple platform support: Web browsers, Node.js (full support), Python (via Raspberry.Ninja), Mobile (Flutter app)

Download & Install

📦 CDN (Recommended)

Always get the latest version automatically

<script src="https://cdn.jsdelivr.net/gh/steveseguin/ninjasdk@latest/vdoninja-sdk.min.js"></script>
Latest ~45KB minified

💾 Direct Download

Download and host the files yourself

v1.1.0 AGPLv3

📱 Node.js Support

Full Node.js support with WebRTC implementations

# Install dependencies
npm install ws @roamhq/wrtc  # or node-datachannel

# Use in your code
const VDONinjaSDK = require('./vdoninja-sdk-node.js');
v1.1.0 Node.js Docs

🤝 Handshake Server Usage Guidelines

The VDO.Ninja SDK uses a WebSocket handshake server to initiate WebRTC connections between peers. Once the handshake is complete, all communication flows directly peer-to-peer. Understanding and respecting the handshake server's limitations ensures this free service remains available for everyone.

🔌 What is the Handshake Server?

  • A minimal WebSocket server that facilitates the initial WebRTC connection setup
  • Exchanges offer/answer SDP messages and ICE candidates between peers
  • Once peers are connected, the handshake server is no longer involved
  • Does NOT relay application data - only connection establishment
  • Maintains no state about connections after handshake completion

🚫 Direct API Access Prohibited

  • You MUST use the SDK - direct WebSocket connections are not permitted
  • The handshake protocol may change without notice
  • Direct API access bypassing the SDK will result in immediate blocking
  • The SDK handles protocol changes and ensures proper usage patterns
  • This policy protects the service from abuse and keeps it free

📊 Rate Limits & Fair Use

  • The handshake server implements rate limiting to prevent abuse
  • Normal SDK usage (connecting, disconnecting, room changes) stays within limits
  • Rapid connection attempts or excessive handshakes will be throttled
  • Higher rate limits available on request for legitimate high-volume use cases
  • Contact us before launching applications expecting high connection rates

🌐 Connection Capacity

  • Rooms support approximately 80 concurrent connections
  • Individual streams may have viewer limits to ensure quality
  • These limits prevent server overload and ensure reliable handshakes
  • For events requiring more connections, please contact us in advance

💭 Serverless Philosophy

  • The handshake server does the absolute minimum - just WebRTC setup
  • No message relay, no data storage, no connection state management
  • All application data MUST flow through P2P connections
  • Attempting to use the handshake server for data relay is prohibited
  • This minimal approach keeps the service free and scalable

✅ Best Practices

  • Always use the official SDK from the CDN or GitHub
  • Keep your SDK version updated for compatibility
  • Implement exponential backoff for reconnection attempts
  • Use P2P data channels for all application messaging
  • Test your application's connection patterns before launch
Community Service: This handshake server is provided free of charge to enable serverless P2P applications. Respecting these guidelines ensures it remains available for innovative developers worldwide. Abuse affects everyone - please be a good citizen of the ecosystem.