Skip to main content
This page documents the StreamPixelApplication function and the configuration options it accepts.

The StreamPixelApplication function

StreamPixelApplication is an async function that initializes the SDK. It:
  1. Fetches your project configuration from the Streampixel API using the appId
  2. Detects the user’s device type (desktop, tablet, or mobile)
  3. Negotiates the best available video codec
  4. Establishes a WebSocket connection to the signaling server
  5. Returns an object with all the tools you need to control the stream

Singleton behavior

StreamPixelApplication can only be called once per page load. If called again, it logs a warning and returns an empty object {}. If you need to reinitialize, reload the page.

The appId parameter

The appId is the only required parameter. Everything else is optional and falls back to your dashboard configuration.
The appId is your project identifier from the Streampixel dashboard. The API uses it to resolve:
  • Which signaling server region to connect to
  • TURN server credentials
  • UE instance pool and routing
  • All default settings configured in your dashboard

Dashboard defaults

Every configuration option (except appId) is optional. When omitted, the SDK uses the values configured in your Streampixel dashboard. SDK-side settings override dashboard settings.

Configuration options

Connection

Codec

Resolution

Resolution preset format: "1080p (1920x1080)". Available presets:
  • "360p (640x360)"
  • "480p (854x480)"
  • "720p (1280x720)"
  • "1080p (1920x1080)"
  • "1440p (2560x1440)"
  • "4K (3840x2160)"

Bitrate and quality

Input

Audio and camera

AFK

Example: full configuration

Next steps

Return values

Understand the five objects returned by StreamPixelApplication.

Connection lifecycle

Hook into the events fired during connection setup.