Skip to main content
Beginner For everyone who is new to the Web SDK. After this page you know what the SDK is, whether you need it, and which page to read next.
Public beta. These pages describe version 2.0.0-beta.2 of @streampixel/web-sdk. Names and behaviour can still change before the stable 2.0.0 release. See the changelog.
Your Unreal Engine app runs on Streampixel’s GPU servers. The Web SDK is a JavaScript library that shows that app inside a page of your own website, as live video that reacts to the viewer’s mouse, keyboard and touch. Your code gets one stream object: it tells you what the stream is doing, and it lets you talk to your app.

Choose your path

I am new here

Beginner. See your app in your own page in five minutes: one HTML file, nothing to install.

I am building a page

Intermediate. npm, the ready-made screens, React, talking to your app.

I am going to production

Advanced. States and events, access, errors, shared sessions, recipes.

I want to know exactly what happens

Expert. How the engine loads and updates, recovery timings, diagnostics.

I have a page on the v1 SDK

Upgrading. Keep your code with the compatibility package, or move to the v2 API.

I am looking something up

Reference. Every option, method, event and error.
Not sure how the pieces fit together? How it works explains them step by step, without code.

Do you need the Web SDK?

Streampixel has three ways to put a stream in front of a viewer. Use the simplest one that does what you need.
You want the stream on your own site with almost no code, and Streampixel’s screens are fine. Your page can still send commands and receive messages through the frame.
  • You want your own screens and controls: your own loading screen, your own buttons, your own layout.
  • Your page and your Unreal app talk to each other a lot, and you want plain method calls and events for it.
  • Your code must know exactly what the stream is doing: queued, reconnecting, why it ended.
  • You build with a framework such as React and want the stream to be a component of your app.

What you need

Two things to check if they apply to you:

What is in the box

Without a build step, one <script> tag gives you the SDK with the same API: see Installation.
  • Access. It follows the project’s access setting in the dashboard: public, password, or single sign-on. See Access.
  • One state. stream.state always says what the stream is doing, and the state event fires on every change.
  • Recovery. It reconnects by itself when the connection drops, and starts one fresh session by itself when no video arrives. See Reliability.
  • Plain-language endings. When a session ends, your code gets a code, a kind and a sentence you can show the viewer.
  • Epic’s names work too. If you know Epic’s Pixel Streaming library, emitUIInteraction(), emitConsoleCommand() and addResponseEventListener() are on the stream object. See Talk to your Unreal app.
The package you install is a small loader. The engine, the code that runs the stream, is downloaded from Streampixel’s servers when your page starts a stream. Fixes reach your site without a new install or deploy.The engine is verified before it runs, and there is no copy of it in the package: if it cannot be loaded, create() rejects with EngineLoadError. See How it works and The engine and its updates.
The SDK reports the session’s lifecycle and connection quality to Streampixel’s own telemetry service. These reports are what the session pages of your dashboard show. There are no third-party trackers, no analytics SDKs and no cookies in the package. Passwords, tickets and the messages between your page and your app are never sent. See Diagnostics.

Next steps

Your first stream

One HTML file, five minutes.

How it works

Your page, the SDK, the platform and the GPU server, step by step.

Installation

npm or a script tag, TypeScript, frameworks.

FAQ

Short answers to common questions.