Configuration Options

This page helps developers understand what options they can pass into StreamPixelApplication() and how they affect the session.

📋 What Are Configuration Options?

When you call StreamPixelApplication(options), you can pass several options to control:

  • Stream connection behavior

  • User input methods

  • Resolution and codec preferences

  • Fallbacks for mobile, XR, or slow networks

These options override the defaults set in your Streampixel dashboard — only for the current session.

🧠 How It Works

  • If you do not set an option in your SDK call, the system uses your dashboard settings.

  • If you do define an option in code, it overrides the dashboard for that session only.

🔧 Available Options

Option
Type
Possible Values / Example
Description

AutoConnect

boolean

true / false

Automatically starts the connection on load

appId

string

"your-app-id"

Your project App ID (required)

useMic

boolean

true / false

Enables microphone access for the session

touchInput

boolean

true / false

Enables touch controls (for mobile or tablets)

mouseInput

boolean

true / false

Enables standard mouse controls

keyBoardInput

boolean

true / false

Enables keyboard inputs like WASD, arrows, etc.

hoverMouse

boolean

true / false

Enables hover events (e.g., for UI highlighting)

gamepadInput

boolean

true / false

Enables gamepad controller support

xrInput

boolean

true / false

Enables XR (VR/AR headset) input

fakeMouseWithTouches

boolean

true / false

Converts touch taps into mouse clicks

afktimeout

number

Any number (e.g., 300, 1800, 3600)

Ends session after X seconds of no interaction

primaryCodec

string

"H264" / "VP8" / "VP9" / "AV1"

Preferred codec to initiate the stream

fallBackCodec

string

"H264" / "VP8" / "VP9" / "AV1"

Fallback codec if primary fails

startResolution

string

"720p (1280x720)", "1080p", "4K"

Initial resolution on desktop

startResolutionMobile

string

"480p (854x480)", "720p", "1080p"

Initial resolution for mobile devices

startResolutionTab

string

"1080p (1920x1080)", "720p"

Initial resolution for tablets

maxStreamQuality

string

"360p" / "480p" / "720p" / "1080p" / "1440p" / "4K"

Caps maximum stream resolution

resolutionMode

string

"Fixed Resolution Mode" / "Crop on Resize Mode" / "Dynamic Resolution Mode"

Determines how stream resizes with window

minBitrate

number

NA

Minimum allowed bitrate for video stream (kbps)

maxBitrate

number

NA

Maximum allowed bitrate for video stream (kbps)

minQP

number

NA

Minimum Quantization Parameter for video encoding.

maxQP

number

NA

Maximum Quantization Parameter. -1 disables upper limit.

✅ Example

const { appStream, pixelStreaming } = await StreamPixelApplication({
  AutoConnect: true,
  appId: "your-app-id",
  touchInput: true,
  keyBoardInput: true,
  resolutionMode: "Fixed Resolution Mode",
  maxStreamQuality: "720p (1280x720)",
});

✅ Best Practices

  • Use dashboard settings for most cases, and override only when you need dynamic or environment-specific control.

  • Avoid hardcoding multiple conflicting options unless you're building a highly customized experience.

  • Always test your configuration across desktop and mobile — especially for input types and resolution preferences.

Last updated