CaptureVideo.js with External VDO.Ninja SDK

How to Use

The updated capturevideo.js now uses the external VDO.Ninja SDK instead of having it embedded.

To use it in your Chrome extension:

  1. Include vdoninja-sdk.js in your extension's manifest
  2. Load it before capturevideo.js
  3. The script will automatically use the external SDK

Chrome Extension Manifest

Update your manifest.json to include both scripts in the correct order:

{
  "content_scripts": [{
    "matches": ["https://discord.com/*"],
    "js": [
      "vdoninja-sdk.js",
      "capturevideo.js"
    ],
    "run_at": "document_start"
  }]
}

SDK Configuration

The script creates SDK instances with this configuration:

const vdo = new VDONinjaSDK({
    room: ROOM_ID,
    password: false,  // No encryption for this demo
    debug: true
});

Testing

To test the integration:

  1. Load your Chrome extension with the updated files
  2. Enable VDO.Ninja integration in the extension settings
  3. Visit a Discord channel with video
  4. Check the console for connection logs
  5. View streams at: https://vdo.ninja/?room=autopublish_XXXXX&scene