> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> A minimal working integration of the Streampixel Web SDK with a video container, plus an overview of what StreamPixelApplication returns.

This page shows the smallest working integration of the Streampixel Web SDK and explains the five values that `StreamPixelApplication` returns.

## Minimal example

<Warning>
  Replace `YOUR_PROJECT_ID` with the actual `appId` from your Streampixel dashboard. The connection will fail without a valid project ID.
</Warning>

```html theme={"dark"}
<!DOCTYPE html>
<html>
<head>
  <style>
    body { margin: 0; overflow: hidden; }
    #video-container { width: 100vw; height: 100vh; }
  </style>
</head>
<body>
  <div id="video-container"></div>
  <script type="module">
    import { StreamPixelApplication } from 'streampixelsdk';

    const { appStream, pixelStreaming, queueHandler, UIControl, reconnectStream } =
      await StreamPixelApplication({
        appId: 'YOUR_PROJECT_ID',  // From Streampixel dashboard
        AutoConnect: true,
      });

    // Mount the video when the stream is ready
    appStream.onVideoInitialized = () => {
      document.getElementById('video-container').appendChild(appStream.rootElement);
    };
  </script>
</body>
</html>
```

## What `StreamPixelApplication` returns

| Object            | Purpose                                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `pixelStreaming`  | Core streaming instance. Listen for events, send commands to UE, control connection.                                          |
| `appStream`       | Application wrapper. Provides `rootElement` (the DOM node containing the video), lifecycle callbacks, and overlay management. |
| `queueHandler`    | Register a callback to receive queue position updates when all UE instances are busy.                                         |
| `UIControl`       | Helper methods for audio toggle, resolution changes, stream stats, and hover mouse control.                                   |
| `reconnectStream` | Event emitter for reconnection state changes (`connecting`, `reconnecting`, `retrying`, `connected`, `failed`).               |

Each of these is covered in detail in the [Return Values](/resources/web-sdk/core-concepts/return-values) page.

## Running the example app

<Steps>
  <Step title="Clone the example repository">
    ```bash theme={"dark"}
    git clone https://github.com/infinity-void-metaverse/Streampixel-SDK-Example.git
    ```
  </Step>

  <Step title="Install and start">
    ```bash theme={"dark"}
    cd Streampixel-SDK-Example
    npm install
    npm start
    ```
  </Step>

  <Step title="Open the app">
    Open your browser to `http://localhost:3000/YOUR_PROJECT_ID` (replace with your actual project ID from the Streampixel dashboard).
  </Step>
</Steps>

The example app demonstrates a complete integration including loading screens, reconnection handling, AFK warnings, stream controls, and developer tools.

## Next steps

<CardGroup cols={2}>
  <Card title="Initialization and configuration" href="/resources/web-sdk/core-concepts/initialization">
    Configure codecs, resolution, input, and AFK behavior.
  </Card>

  <Card title="Connection lifecycle" href="/resources/web-sdk/core-concepts/connection-lifecycle">
    Understand the events fired during connection setup.
  </Card>

  <Card title="Communicating with Unreal Engine" href="/resources/web-sdk/features/communicating-with-ue">
    Send commands and receive responses from your UE app.
  </Card>
</CardGroup>
