social_stream

Understanding Social Stream Ninja for AI Integration

This document provides an overview of the Social Stream Ninja (SSN) application, focusing on aspects relevant for AI integration, custom development, and API interaction.

1. Introduction

Social Stream Ninja is an application designed to consolidate live social media messaging streams and provide various tools for streamers. It supports numerous platforms like Twitch, YouTube, Facebook, TikTok, and more, capturing chat messages, events, and donations. The system consists of a browser extension (or standalone app), a dock/dashboard page (dock.html), and various overlay pages (featured.html, actions.html, etc.). Communication between these components primarily uses WebSockets via VDO.Ninja’s infrastructure, but also supports direct HTTP/POST/SSE interactions.

2. Core Concepts

Session ID & Password

Message Structure

Messages within the SSN system generally follow a JSON object structure. Key fields often include:

Event Types

The system captures various events beyond simple chat messages, such as follows, subscriptions, viewer count updates, donations, etc.. These often have an event field in the message structure.

3. Overlays and Customization

SSN provides several HTML-based overlays:

Customization:

4. API Interaction

SSN offers multiple ways for external applications or AI to interact with it.

Connection Methods

Channel System

Common API Commands

Message Flow

  1. Capture: Extension captures messages/events from social platforms.
  2. Processing (Extension): background.js processes messages, applies bot actions (applyBotActions), filters, adds metadata.
  3. Distribution (Extension): sendToDestinations sends messages via P2P (sendDataP2P) or WebSocket server (if configured) to docks, overlays, and potentially external APIs (POST/PUT/H2R/Singular).
  4. Dock Interaction: Dock (dock.html) receives messages, displays them, allows user interaction (clicking, queuing, pinning).
  5. Dock Actions: Dock sends commands back to the Extension (via P2P or server) to feature messages, block users, send replies, etc..
  6. Overlay Display: Overlays (featured.html, etc.) receive featured content or specific data (like waitlist updates) and display it.
  7. API Interaction: External applications/AI can send commands via WebSocket/HTTP to control the system or ingest messages.

5. Relay Messages

6. Text-to-Speech (TTS)

7. Other Features

SSN includes many other features, such as:

8. Conclusion for AI Integration

Social Stream Ninja offers a robust system for managing multi-platform chat and events. For AI integration:

By understanding these components and APIs, an AI can effectively interact with and enhance the Social Stream Ninja experience.