Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.
Advanced For developers who build a page while the Unreal app is still changing. After this page you can stream from Unreal on your own machine into your page, without packaging or uploading a build.Test locally streams from Unreal on your own machine instead of an uploaded build. Nothing is uploaded and no Streampixel GPU is used: your machine renders, and Streampixel connects the browser to it. The SDK joins such a session with the dev option.
const stream = await Streampixel.create({ appId: 'YOUR_PROJECT_ID', container, dev: { sessionId: 'dev-1a2b3c' }, // from the dashboard's Test Locally tab});
Test locally is in beta: the dashboard tab is labelled BETA. The dev option is part of @streampixel/web-sdk 2.0.0-beta.2.
When to use it
Use it to
Do not use it for
Build your page before the project has a build.
Viewers of a released app: they use the normal options, without dev.
Try a change in Unreal against your page without packaging and uploading a build.
Measuring start time, bitrate or resolution limits: the app runs on your machine and your network, not on Streampixel’s GPU servers.
Work on the messages between your page and your app: emitUIInteraction() or send() one way, addResponseEventListener() or the ueMessage event the other way.
The last check before a release: test the uploaded build.
How it works
A dev session is a meeting point for one Unreal process and your browser.Streampixel connects the two: your page shows what Unreal renders on your machine.You do three things, in three places:
Dashboard: start a session. It has an ID (dev- and six characters) and lasts 2 hours.
Unreal: connect to the session with its signalling URL or its launch argument.
Your page: pass the session ID to create().
Steps 2 and 3 can be done in either order: the page waits for Unreal.
Before you start
A Streampixel project and its project ID. The project needs no build, and it may be switched off.
Unreal Engine with the Pixel Streaming plugin enabled. It is already on if you have uploaded a build to Streampixel.
A network that lets your machine reach Streampixel’s dev streamer: outbound access to dev-streamer.streampixel.io on port 8888. See Test Locally in the dashboard guide.
A page with the SDK installed, served over https or from localhost.
A project whose access is public, password or single sign-on. A “Your app only” project (not available yet) cannot be opened with dev.
Set it up
1
Start a session in the dashboard
Open the project, then the Test Locally tab, and start a session. The session’s row shows:
Shown
Use
The session ID: dev- and six characters, for example dev-1a2b3c
Pass it to the SDK as dev.sessionId.
Signalling server URL
For streaming the Level Editor.
Launch argument, in a Pixel Streaming 1 and a Pixel Streaming 2 form
For a Standalone Game or a packaged build.
Preview link
Streampixel’s own player on the same session. The SDK does not need it. It is useful to tell a problem in your page from a problem in Unreal.
A session lasts 2 hours. The row shows the time left. After that, start a new session and use its ID: the old launch argument stops working.
The launch argument contains a token that identifies your session. Treat it like a password: do not commit it or paste it into a shared channel.
The dashboard side is described step by step in Test Locally.
2
Connect Unreal
There are three ways to connect Unreal to the session. Use one.
Level Editor
Standalone Game
Packaged build
Paste the session’s Signalling server URL into the Signalling Server URL field of the Pixel Streaming toolbar menu. Then choose Stream Level Editor.This streams what the editor shows. It needs no launch argument and no restart.
Paste the session’s Launch argument into Editor Preferences → Level Editor → Play → Additional Launch Parameters. Then choose Standalone Game from the Play dropdown.This starts a separate game process, launched the way Streampixel’s servers launch a build. It renders off-screen, so no game window opens on your machine: you see it in your page.
Play In Editor (selected viewport or new window) does not stream. Use Standalone Game.
Start the build with the Launch argument on its command line:
MyProject.exe <launch argument>
The session’s row in the dashboard shows Connected when Unreal has reached Streampixel.
PS1 or PS2: which launch argument?
The launch argument comes in two forms, because Unreal renamed the plugin’s settings in 5.5. Choose the one that matches the plugin your project uses:
Your plugin
Form
Flags it carries
Pixel Streaming (Unreal Engine 5.4 and earlier)
PS1
-PixelStreamingURL=… with MinQP / MaxQP
Pixel Streaming 2 (Unreal Engine 5.5 and later)
PS2
-PixelStreamingConnectionURL=… with MinQuality / MaxQuality
With the wrong form the flags are ignored. See PS1 or PS2?.
3
Pass the session ID to create()
Add dev to the options, with the project’s appId as usual. Everything else in your page stays as it is.
main.ts
import { Streampixel } from '@streampixel/web-sdk';const stream = await Streampixel.create({ appId: 'YOUR_PROJECT_ID', container: document.getElementById('stream')!, dev: { sessionId: 'dev-1a2b3c' }, // from the dashboard's Test Locally tab});
Your page shows what Unreal renders. If Unreal is not connected yet, the state stays connecting until it is.
Keep the session ID out of your code
A session, and with it its ID, lasts 2 hours, so do not write the ID into your code. A common pattern is to read it from the page address during development. The released page then has no dev option:
The dev session ID from the dashboard: dev- and six characters. Requires appId.
What is different in a dev session
In a dev session
Detail
No build needed
The project may have no build and may be switched off.
Access still applies
A password project asks for the password and a single sign-on project sends the viewer to sign in, as usual. See Access.
Waits for Unreal
Start the page before or after Unreal. The state stays connecting until Unreal connects, with no time limit.
Stopping or restarting Unreal
The state becomes reconnecting with waitingForHost: true, and the stream comes back by itself when Unreal connects again, for up to 10 minutes. After that the session ends with code 4007: call create() again.
No idle timeout
The idle countdown is off.
No fresh session
When no video arrives for 10 seconds, the SDK rejoins the same session, up to 3 times, instead of starting a new app process: there is only your Unreal.
stream.streamerId
The dev session ID.
Ticket
Always sent in the signalling URL, also when advanced.ticketInUrl is false.
Not allowed with
shared, or auth: { mode: 'ticket' }: both are refused with a TypeError. A dev session cannot be a shared session and cannot use a ticket from your server. appId is required.
To tell the two waiting cases apart in your own screens:
stream.on('state', (s) => { if (s.kind === 'connecting') setStatus('Waiting for Unreal to connect…'); else if (s.kind === 'reconnecting' && s.waitingForHost) setStatus('Unreal stopped. Waiting for it to come back…'); else if (s.kind === 'streaming') setStatus('');});
The ready-made screens of @streampixel/ui do this for you: in a dev session the loading screen says “Waiting for your Unreal Editor…”. See Ready-made screens.
A dev session does not tell you how the uploaded build behaves. The app runs on your machine and your network, so start time, bitrate, resolution limits and behaviour on Streampixel’s GPU servers are not the same. Test the uploaded build before you release.
Errors
create() rejects before the stream starts:
Error
Meaning
What to do
AuthError, kind dev-session-not-found
No such dev session, or the session was started for another project than appId.
Check the ID against the session’s row, and that appId is the project the session belongs to.
AuthError, kind dev-session-expired
The dev session has expired.
Start a new session in the dashboard, use its ID, and connect Unreal with the new session’s URL or launch argument.
AuthError, kind server-ticket-required
The project is set to “Your app only” (not available yet), which cannot be opened with dev.
Switch the project to another access mode while you test locally, or use a second project.
TypeError
dev together with shared or auth: { mode: 'ticket' }, a dev.sessionId that is not a dev session ID, or dev without appId. The message names the option.
Correct the option.
After the stream started, the session ends with the ended event:
Code
When
What to do
4007
Unreal stopped and did not come back within 10 minutes.
Start Unreal, then call create() again.
4102, or 4101 when the video connection never came up
No video arrived, also after the SDK rejoined the session three times.
Check that Unreal is rendering and still connected, then call create() again.
1008
The session expired while the page was open. The stream that was running continued. The next reconnect was refused. The message says to start a new dev session.
Start a new session and use its ID.
All other errors and end codes are the same as for a normal session: see Errors and disconnects.
Troubleshooting
The state stays connecting
Unreal has not connected to the session. The page waits without a time limit.Look at the session’s row in the dashboard. If it does not say Connected, one of these is the cause: the PS1 / PS2 form does not match the plugin, the Pixel Streaming plugin is disabled, port 8888 is blocked, or the session has expired.
The row says Connected, and the page still waits
The page uses the ID of another session than the one Unreal joined. Use the ID from the same row as the URL or launch argument you gave Unreal.
The preview link shows the stream, my page does not
The problem is in the page, not in Unreal. Check the appId and dev.sessionId passed to create(), and what create() rejected with.
Nothing appears on my screen after Standalone Game
That is expected: the game renders off-screen. Open your page, or the preview link.
Selected Viewport or New Editor Window does not stream
Play In Editor ignores the launch argument. Use Standalone Game.
The page asks for a password, or goes to a sign-in page
The project’s access mode applies to dev sessions too. Enter the password or sign in, as a viewer would.
consoleCommand() returns false while streaming
The app was not launched with -AllowPixelStreamingCommands. The launch argument carries it: paste the launch argument exactly as the dashboard shows it. This applies to stream.consoleCommand() and to stream.emitConsoleCommand(), which are the same call.
dev-session-not-found for an ID I just copied
The session belongs to another project than appId. Start the session from the project whose ID you pass as appId.
It worked, and now create() rejects with dev-session-expired
The 2 hours are over. Start a new session. Unreal needs the new session’s URL or launch argument as well.
The session ended with 4007 after I closed Unreal
More than 10 minutes passed without Unreal. Start Unreal and call create() again.
The dashboard says Local dev mode is temporarily unavailable
The dev service is being updated. Try again in a few minutes.
Next steps
Talk to your Unreal app
Send and receive messages: the work a dev session is made for.
Test Locally in the dashboard
Start, revoke and read a dev session; the editor and Standalone Game steps in detail.
Reliability
One level up: the timings behind waiting, reconnecting and rejoining.
Options
Reference: everything create() accepts, dev included.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Streampixel","colors":{"primary":"#00B8E6","light":"#5BDFFF","dark":"#0098C2"},"logo":{"light":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe","dark":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe"},"favicon":"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/favicon.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=62bf1ddb75c1efac5b837698245aa6ed","appearance":{"default":"dark"},"background":{"decoration":"gradient","color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"links":[{"href":"https://status.streampixel.io","label":"Status"},{"href":"mailto:support@streampixel.io","label":"Support"},{"href":"https://dashboard.streampixel.io","label":"Dashboard"}],"primary":{"type":"button","label":"Start free","href":"https://dashboard.streampixel.io"}},"footer":{"socials":{"github":"https://github.com/infinity-void-metaverse","x":"https://x.com/streampixel","linkedin":"https://www.linkedin.com/company/streampixel"},"links":[{"header":"Product","items":[{"label":"Dashboard","href":"https://dashboard.streampixel.io"},{"label":"Pricing","href":"https://streampixel.io/pricing"},{"label":"Status","href":"https://status.streampixel.io"}]},{"header":"Developers","items":[{"label":"Get Started","href":"/resources/quick-start-guide/register-and-sign-in"},{"label":"Web SDK","href":"/resources/web-sdk-v2/overview"},{"label":"REST API","href":"/resources/api-reference/overview"},{"label":"Example app","href":"https://github.com/infinity-void-metaverse/Streampixel-SDK-Example"}]},{"header":"Company","items":[{"label":"Contact","href":"mailto:support@streampixel.io"},{"label":"GitHub","href":"https://github.com/infinity-void-metaverse"}]}]},"search":{"prompt":"Ask the docs..."},"seo":{"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"streampixel","hasAudioNarration":false,"actualSubdomain":"streampixel","customDomains":["docs.streampixel.io"],"gitSource":{"type":"github","owner":"infinity-void-metaverse","repo":"streampixel-documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afaec66eb13d58ceebf8c76","clientVersion":"0.0.4160","searchFilterCounts":[{"language":"default","tag":"Dashboard","count":35},{"language":"default","tag":"REST API","count":28},{"language":"default","tag":"Web SDK","count":23},{"language":"default","tag":"Guides \u0026 Reference","count":19},{"language":"default","tag":"Reference","count":13},{"language":"default","tag":"Get Started","count":8},{"language":"default","tag":"Sessions \u0026 analytics","count":8},{"language":"default","tag":"Project settings","count":8},{"language":"default","tag":"Use cases","count":7},{"language":"default","tag":"Go further","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles/custom.css","content":":root{--sp-cyan: #00D4FF;--sp-cyan-bright: #00E5FF;--sp-cyan-soft: rgba(0, 212, 255, 0.12);--sp-cyan-glow: rgba(0, 212, 255, 0.28);--sp-cyan-fade: rgba(0, 212, 255, 0.04);--sp-teal: #1ABFB1;--sp-green: #1DB95C;--sp-bg-dark: #0A0A0A;--sp-card-dark: rgba(18, 18, 18, 0.7);--sp-card-solid: #121212;--sp-border-dark: rgba(255, 255, 255, 0.08);--sp-border-strong: rgba(255, 255, 255, 0.14)}.dark a[class*=\"card\"],.dark .card{position:relative;background:var(--sp-card-dark)!important;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--sp-border-dark)!important;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.04),\n 0 8px 24px rgba(0, 0, 0, 0.25);transition:transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease}.dark a[class*=\"card\"]:hover,.dark .card:hover{border-color:var(--sp-cyan-glow)!important;box-shadow:0 0 0 1px var(--sp-cyan-glow),\n 0 12px 32px rgba(0, 212, 255, 0.12),\n inset 0 1px 0 rgba(0, 212, 255, 0.06);transform:translateY(-2px)}.dark a[class*=\"card\"]::before,.dark .card::before{content:\"\";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(\n 135deg,\n rgba(0, 212, 255, 0.18) 0%,\n transparent 35%,\n transparent 65%,\n rgba(26, 191, 177, 0.14) 100%\n );-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0.5;pointer-events:none;transition:opacity 220ms ease}.dark a[class*=\"card\"]:hover::before,.dark .card:hover::before{opacity:1}.dark a[class*=\"card\"] svg,.dark .card svg{color:var(--sp-cyan)!important}.dark pre,.dark .prose pre{position:relative;border:1px solid var(--sp-border-dark);background:#0E0E0E!important}.dark pre code{background:transparent!important}.dark :not(pre)>code{background:var(--sp-cyan-soft)!important;color:var(--sp-cyan)!important;padding:0.15em 0.4em;border-radius:4px;font-weight:500;border:1px solid rgba(0, 212, 255, 0.18)}.dark [class*=\"step\"] [class*=\"circle\"],.dark .steps-container li::before{background:linear-gradient(135deg, var(--sp-cyan), #00A8D6)!important;color:#0A0A0A!important;font-weight:700;box-shadow:0 0 16px var(--sp-cyan-glow)}.dark [class*=\"callout\"][class*=\"info\"],.dark [class*=\"callout\"][class*=\"tip\"]{border-left-color:var(--sp-cyan)!important}.dark table{border:1px solid var(--sp-border-dark);border-radius:8px;overflow:hidden;background:rgba(14, 14, 14, 0.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.dark thead{background:rgba(0, 212, 255, 0.05)}.dark th{color:var(--sp-cyan)!important;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;font-size:0.75em}.dark tbody tr{border-top:1px solid var(--sp-border-dark)}.dark tbody tr:hover{background:rgba(0, 212, 255, 0.04)}.dark [class*=\"sidebar\"] [class*=\"active\"]{background:var(--sp-cyan-soft)!important;color:var(--sp-cyan)!important;border-left:2px solid var(--sp-cyan);box-shadow:inset 0 0 12px rgba(0, 212, 255, 0.08)}.prose h1{letter-spacing:-0.025em;font-weight:700}.prose h2{letter-spacing:-0.02em;font-weight:650;position:relative}.prose h3{letter-spacing:-0.015em}.sp-hero{position:relative;margin:-1rem -1rem 2.75rem -1rem;padding:3.25rem 2.25rem 3.75rem;border-radius:18px;background:radial-gradient(ellipse at 75% 25%, rgba(0, 212, 255, 0.18), transparent 55%),\n radial-gradient(ellipse at 20% 85%, rgba(26, 191, 177, 0.12), transparent 50%),\n linear-gradient(180deg, #0E0E0E 0%, #080808 100%);border:1px solid var(--sp-border-strong);overflow:hidden;isolation:isolate}.sp-hero-grid{position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2300d4ff' fill-opacity='0.05'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");-webkit-mask-image:radial-gradient(ellipse at center, black 25%, transparent 80%);mask-image:radial-gradient(ellipse at center, black 25%, transparent 80%);pointer-events:none;z-index:0}.sp-hero-glow{position:absolute;width:60%;height:140%;top:-20%;right:-10%;background:radial-gradient(ellipse at center, rgba(0, 212, 255, 0.22) 0%, transparent 60%);filter:blur(24px);pointer-events:none;z-index:0;animation:sp-hero-glow-drift 14s ease-in-out infinite}@keyframes sp-hero-glow-drift{0%,100%{transform:translate(0, 0) scale(1);opacity:0.85}50%{transform:translate(-8%, 4%) scale(1.08);opacity:1}}.sp-hero>*:not(.sp-hero-grid):not(.sp-hero-glow){position:relative;z-index:1}.sp-hero-eyebrow{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.72rem;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--sp-cyan);background:var(--sp-cyan-soft);border:1px solid rgba(0, 212, 255, 0.25);padding:0.4rem 0.85rem;border-radius:999px;margin-bottom:1.4rem;box-shadow:0 0 18px rgba(0, 212, 255, 0.12)}.sp-hero-eyebrow::before{content:\"\";width:6px;height:6px;border-radius:50%;background:var(--sp-cyan);box-shadow:0 0 8px var(--sp-cyan);animation:sp-pulse 1.6s ease-in-out infinite}@keyframes sp-pulse{0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(0, 212, 255, 0.5)}50%{opacity:0.7;box-shadow:0 0 0 6px rgba(0, 212, 255, 0)}}.sp-hero-title{font-size:clamp(2.1rem, 5.2vw, 3rem);font-weight:700;letter-spacing:-0.032em;line-height:1.08;margin:0 0 0.85rem 0;background:linear-gradient(180deg, #ffffff 0%, #b8b8b8 100%);-webkit-background-clip:text;background-clip:text;color:transparent}.sp-hero-sub{font-size:1.1rem;line-height:1.55;color:rgba(255, 255, 255, 0.72);max-width:640px;margin:0 0 1.85rem 0}.sp-hero-cta-row{display:flex;flex-wrap:wrap;gap:0.75rem}.sp-hero-cta{display:inline-flex;align-items:center;gap:0.5rem;background:linear-gradient(135deg, var(--sp-cyan-bright), #00A8D6);color:#0A0A0A!important;font-weight:600;padding:0.75rem 1.4rem;border-radius:9px;text-decoration:none!important;box-shadow:0 0 0 1px rgba(0, 212, 255, 0.5),\n 0 0 28px var(--sp-cyan-glow),\n inset 0 1px 0 rgba(255, 255, 255, 0.25);transition:transform 150ms ease, box-shadow 150ms ease}.sp-hero-cta:hover{transform:translateY(-1px);box-shadow:0 0 0 1px rgba(0, 212, 255, 0.7),\n 0 0 36px rgba(0, 212, 255, 0.45),\n inset 0 1px 0 rgba(255, 255, 255, 0.3)}.sp-hero-cta-secondary{display:inline-flex;align-items:center;gap:0.5rem;color:rgba(255, 255, 255, 0.88)!important;background:rgba(255, 255, 255, 0.03);border:1px solid var(--sp-border-strong);padding:0.75rem 1.4rem;border-radius:9px;text-decoration:none!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:border-color 150ms ease, color 150ms ease, background 150ms ease}.sp-hero-cta-secondary:hover{border-color:var(--sp-cyan-glow);color:var(--sp-cyan)!important;background:rgba(0, 212, 255, 0.05)}:root:not(.dark) .sp-hero{background:radial-gradient(ellipse at 80% 20%, rgba(0, 184, 230, 0.10), transparent 55%),\n radial-gradient(ellipse at 20% 85%, rgba(26, 191, 177, 0.08), transparent 50%),\n linear-gradient(180deg, #FAFCFE 0%, #F2F6F9 100%);border:1px solid #E5E7EB}:root:not(.dark) .sp-hero-grid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%230098C2' fill-opacity='0.06'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}:root:not(.dark) .sp-hero-glow{background:radial-gradient(ellipse at center, rgba(0, 184, 230, 0.12) 0%, transparent 60%)}:root:not(.dark) .sp-hero-title{background:linear-gradient(180deg, #0A0A0A 0%, #404040 100%);-webkit-background-clip:text;background-clip:text;color:transparent}:root:not(.dark) .sp-hero-sub{color:#475569}:root:not(.dark) .sp-hero-eyebrow{color:#0098C2;background:rgba(0, 184, 230, 0.08);border-color:rgba(0, 184, 230, 0.25)}:root:not(.dark) .sp-hero-cta-secondary{color:#0F172A!important;background:rgba(255, 255, 255, 0.6);border-color:#D1D5DB}:root:not(.dark) :not(pre)>code{background:rgba(0, 184, 230, 0.08)!important;color:#006B8C!important;border-color:rgba(0, 184, 230, 0.2)}.dark ::-webkit-scrollbar{width:10px;height:10px}.dark ::-webkit-scrollbar-track{background:transparent}.dark ::-webkit-scrollbar-thumb{background:rgba(255, 255, 255, 0.08);border-radius:5px}.dark ::-webkit-scrollbar-thumb:hover{background:rgba(0, 212, 255, 0.25)}@media (prefers-reduced-motion: reduce){.sp-hero-glow{animation:none}.sp-hero-eyebrow::before{animation:none}.dark a[class*=\"card\"],.dark .card{transition:none}}"}],"page":{"pagePath":"resources/web-sdk-v2/test-locally","slug":"/resources/web-sdk-v2/test-locally","pageMetadata":{"title":"Test locally","description":"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.","icon":"laptop-code","keywords":["test locally","dev session","dev option","Unreal Editor","Standalone Game","local development","dev-session-expired"],"href":"/resources/web-sdk-v2/test-locally"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Badge,Card,CardGroup,Check,CodeBlock,Heading,Note,ParamField,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Badge)_missingMdxReference(`Badge`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(Badge,{color:`orange`,children:`Advanced`}),` For developers who build a page while the Unreal app is still changing. After this page you can stream from Unreal on your own machine into your page, without packaging or uploading a build.`]}),`\n`,_jsxs(_components.p,{children:[`Test locally streams from Unreal on your own machine instead of an uploaded build. Nothing is uploaded and no Streampixel GPU is used: your machine renders, and Streampixel connects the browser to it. The SDK joins such a session with the `,_jsx(_components.code,{children:`dev`}),` option.`]}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[4]`,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` Streampixel`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` appId:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_PROJECT_ID'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` container`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` dev:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`sessionId:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'dev-1a2b3c'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`// from the dashboard's Test Locally tab`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Test locally is in beta: the dashboard tab is labelled BETA. The `,_jsx(_components.code,{children:`dev`}),` option is part of `,_jsx(_components.code,{children:`@streampixel/web-sdk`}),` 2.0.0-beta.2.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use-it`,children:`When to use it`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Use it to`}),_jsx(_components.th,{children:`Do not use it for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Build your page before the project has a build.`}),_jsxs(_components.td,{children:[`Viewers of a released app: they use the normal options, without `,_jsx(_components.code,{children:`dev`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Try a change in Unreal against your page without packaging and uploading a build.`}),_jsx(_components.td,{children:`Measuring start time, bitrate or resolution limits: the app runs on your machine and your network, not on Streampixel’s GPU servers.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Work on the `,_jsx(_components.a,{href:`/resources/web-sdk-v2/messaging`,children:`messages between your page and your app`}),`: `,_jsx(_components.code,{children:`emitUIInteraction()`}),` or `,_jsx(_components.code,{children:`send()`}),` one way, `,_jsx(_components.code,{children:`addResponseEventListener()`}),` or the `,_jsx(_components.code,{children:`ueMessage`}),` event the other way.`]}),_jsx(_components.td,{children:`The last check before a release: test the uploaded build.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsx(_components.p,{children:`A dev session is a meeting point for one Unreal process and your browser.`}),`\n`,_jsx(_components.p,{children:`Streampixel connects the two: your page shows what Unreal renders on your machine.`}),`\n`,_jsx(_components.p,{children:`You do three things, in three places:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Dashboard`}),`: start a session. It has an ID (`,_jsx(_components.code,{children:`dev-`}),` and six characters) and lasts 2 hours.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unreal`}),`: connect to the session with its signalling URL or its launch argument.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your page`}),`: pass the session ID to `,_jsx(_components.code,{children:`create()`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Steps 2 and 3 can be done in either order: the page waits for Unreal.`}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A Streampixel project and its project ID. The project needs no build, and it may be switched off.`}),`\n`,_jsxs(_components.li,{children:[`Unreal Engine with the `,_jsx(_components.strong,{children:`Pixel Streaming`}),` plugin enabled. It is already on if you have uploaded a build to Streampixel.`]}),`\n`,_jsxs(_components.li,{children:[`A network that lets your machine reach Streampixel’s dev streamer: outbound access to `,_jsx(_components.code,{children:`dev-streamer.streampixel.io`}),` on port `,_jsx(_components.code,{children:`8888`}),`. See `,_jsx(_components.a,{href:`/resources/dashboard/test-locally#before-you-start`,children:`Test Locally`}),` in the dashboard guide.`]}),`\n`,_jsxs(_components.li,{children:[`A page with the SDK `,_jsx(_components.a,{href:`/resources/web-sdk-v2/installation`,children:`installed`}),`, served over https or from `,_jsx(_components.code,{children:`localhost`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A project whose access is public, password or single sign-on. A “Your app only” project (not available yet) cannot be opened with `,_jsx(_components.code,{children:`dev`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`set-it-up`,children:`Set it up`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Start a session in the dashboard`,children:[_jsxs(_components.p,{children:[`Open the project, then the `,_jsx(_components.strong,{children:`Test Locally`}),` tab, and start a session. The session’s row shows:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Shown`}),_jsx(_components.th,{children:`Use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`The session ID: `,_jsx(_components.code,{children:`dev-`}),` and six characters, for example `,_jsx(_components.code,{children:`dev-1a2b3c`})]}),_jsxs(_components.td,{children:[`Pass it to the SDK as `,_jsx(_components.code,{children:`dev.sessionId`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Signalling server URL`})}),_jsx(_components.td,{children:`For streaming the Level Editor.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Launch argument`}),`, in a Pixel Streaming 1 and a Pixel Streaming 2 form`]}),_jsx(_components.td,{children:`For a Standalone Game or a packaged build.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Preview link`})}),_jsx(_components.td,{children:`Streampixel’s own player on the same session. The SDK does not need it. It is useful to tell a problem in your page from a problem in Unreal.`})]})]})]}),_jsxs(_components.p,{children:[`A session lasts `,_jsx(_components.strong,{children:`2 hours`}),`. The row shows the time left. After that, start a new session and use its ID: the old launch argument stops working.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`The launch argument contains a token that identifies your session. Treat it like a password: do not commit it or paste it into a shared channel.`})}),_jsxs(_components.p,{children:[`The dashboard side is described step by step in `,_jsx(_components.a,{href:`/resources/dashboard/test-locally`,children:`Test Locally`}),`.`]})]}),_jsxs(Step,{title:`Connect Unreal`,children:[_jsx(_components.p,{children:`There are three ways to connect Unreal to the session. Use one.`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Level Editor`,id:`level-editor`,children:[_jsxs(_components.p,{children:[`Paste the session’s `,_jsx(_components.strong,{children:`Signalling server URL`}),` into the `,_jsx(_components.strong,{children:`Signalling Server URL`}),` field of the Pixel Streaming toolbar menu. Then choose `,_jsx(_components.strong,{children:`Stream Level Editor`}),`.`]}),_jsx(_components.p,{children:`This streams what the editor shows. It needs no launch argument and no restart.`})]}),_jsxs(Tab,{title:`Standalone Game`,id:`standalone-game`,children:[_jsxs(_components.p,{children:[`Paste the session’s `,_jsx(_components.strong,{children:`Launch argument`}),` into `,_jsx(_components.strong,{children:`Editor Preferences → Level Editor → Play → Additional Launch Parameters`}),`. Then choose `,_jsx(_components.strong,{children:`Standalone Game`}),` from the Play dropdown.`]}),_jsx(_components.p,{children:`This starts a separate game process, launched the way Streampixel’s servers launch a build. It renders off-screen, so no game window opens on your machine: you see it in your page.`}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Play In Editor (selected viewport or new window) does not stream. Use `,_jsx(_components.strong,{children:`Standalone Game`}),`.`]})})]}),_jsxs(Tab,{title:`Packaged build`,id:`packaged-build`,children:[_jsxs(_components.p,{children:[`Start the build with the `,_jsx(_components.strong,{children:`Launch argument`}),` on its command line:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`MyProject.exe \u003claunch argument>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})]}),_jsx(Check,{children:_jsxs(_components.p,{children:[`The session’s row in the dashboard shows `,_jsx(_components.strong,{children:`Connected`}),` when Unreal has reached Streampixel.`]})}),_jsxs(Accordion,{title:`PS1 or PS2: which launch argument?`,id:`ps1-or-ps2-which-launch-argument`,children:[_jsx(_components.p,{children:`The launch argument comes in two forms, because Unreal renamed the plugin’s settings in 5.5. Choose the one that matches the plugin your project uses:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Your plugin`}),_jsx(_components.th,{children:`Form`}),_jsx(_components.th,{children:`Flags it carries`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Pixel Streaming (Unreal Engine 5.4 and earlier)`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`PS1`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-PixelStreamingURL=…`}),` with `,_jsx(_components.code,{children:`MinQP`}),` / `,_jsx(_components.code,{children:`MaxQP`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Pixel Streaming 2 (Unreal Engine 5.5 and later)`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`PS2`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-PixelStreamingConnectionURL=…`}),` with `,_jsx(_components.code,{children:`MinQuality`}),` / `,_jsx(_components.code,{children:`MaxQuality`})]})]})]})]}),_jsxs(_components.p,{children:[`With the wrong form the flags are ignored. See `,_jsx(_components.a,{href:`/resources/dashboard/test-locally#ps1-or-ps2`,children:`PS1 or PS2?`}),`.`]})]})]}),_jsxs(Step,{title:`Pass the session ID to create()`,children:[_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`dev`}),` to the options, with the project’s `,_jsx(_components.code,{children:`appId`}),` as usual. Everything else in your page stays as it is.`]}),_jsx(CodeBlock,{filename:`main.ts`,highlight:`[6]`,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`Streampixel`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '@streampixel/web-sdk'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` Streampixel`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` appId:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_PROJECT_ID'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` container:`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'stream'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)!,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` dev:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`sessionId:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'dev-1a2b3c'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`// from the dashboard's Test Locally tab`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(Check,{children:_jsxs(_components.p,{children:[`Your page shows what Unreal renders. If Unreal is not connected yet, the state stays `,_jsx(_components.code,{children:`connecting`}),` until it is.`]})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`keep-the-session-id-out-of-your-code`,children:`Keep the session ID out of your code`}),`\n`,_jsxs(_components.p,{children:[`A session, and with it its ID, lasts 2 hours, so do not write the ID into your code. A common pattern is to read it from the page address during development. The released page then has no `,_jsx(_components.code,{children:`dev`}),` option:`]}),`\n`,_jsx(CodeBlock,{filename:`main.ts`,highlight:`[2,7]`,numberOfLines:`8`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`// https://localhost:5173/?dev=dev-1a2b3c`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` devSession`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` URLSearchParams`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`search`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'dev'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` Streampixel`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` appId:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_PROJECT_ID'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` container:`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'stream'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)!,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ...(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`devSession`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ? { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`dev:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`sessionId:`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` devSession`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` } } : {}),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`dev.sessionId`,type:`string`,id:`param-dev-session-id`,children:_jsxs(_components.p,{children:[`The dev session ID from the dashboard: `,_jsx(_components.code,{children:`dev-`}),` and six characters. Requires `,_jsx(_components.code,{children:`appId`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-different-in-a-dev-session`,children:`What is different in a dev session`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`In a dev session`}),_jsx(_components.th,{children:`Detail`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No build needed`}),_jsx(_components.td,{children:`The project may have no build and may be switched off.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Access still applies`}),_jsxs(_components.td,{children:[`A password project asks for the password and a single sign-on project sends the viewer to sign in, as usual. See `,_jsx(_components.a,{href:`/resources/web-sdk-v2/access`,children:`Access`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Waits for Unreal`}),_jsxs(_components.td,{children:[`Start the page before or after Unreal. The state stays `,_jsx(_components.code,{children:`connecting`}),` until Unreal connects, with no time limit.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Stopping or restarting Unreal`}),_jsxs(_components.td,{children:[`The state becomes `,_jsx(_components.code,{children:`reconnecting`}),` with `,_jsx(_components.code,{children:`waitingForHost: true`}),`, and the stream comes back by itself when Unreal connects again, for up to 10 minutes. After that the session ends with code `,_jsx(_components.code,{children:`4007`}),`: call `,_jsx(_components.code,{children:`create()`}),` again.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No idle timeout`}),_jsx(_components.td,{children:`The idle countdown is off.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No fresh session`}),_jsx(_components.td,{children:`When no video arrives for 10 seconds, the SDK rejoins the same session, up to 3 times, instead of starting a new app process: there is only your Unreal.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stream.streamerId`})}),_jsx(_components.td,{children:`The dev session ID.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Ticket`}),_jsxs(_components.td,{children:[`Always sent in the signalling URL, also when `,_jsx(_components.code,{children:`advanced.ticketInUrl`}),` is `,_jsx(_components.code,{children:`false`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Not allowed with`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`shared`}),`, or `,_jsx(_components.code,{children:`auth: { mode: 'ticket' }`}),`: both are refused with a `,_jsx(_components.code,{children:`TypeError`}),`. A dev session cannot be a `,_jsx(_components.a,{href:`/resources/web-sdk-v2/shared-sessions`,children:`shared session`}),` and cannot use a ticket from your server. `,_jsx(_components.code,{children:`appId`}),` is required.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`To tell the two waiting cases apart in your own screens:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'state'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` === `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'connecting'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`setStatus`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'Waiting for Unreal to connect…'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` === `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'reconnecting'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`waitingForHost`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`setStatus`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'Unreal stopped. Waiting for it to come back…'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` === `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'streaming'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`setStatus`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`The ready-made screens of `,_jsx(_components.code,{children:`@streampixel/ui`}),` do this for you: in a dev session the loading screen says “Waiting for your Unreal Editor…”. See `,_jsx(_components.a,{href:`/resources/web-sdk-v2/ui-overlays`,children:`Ready-made screens`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`A dev session does not tell you how the uploaded build behaves. The app runs on your machine and your network, so start time, bitrate, resolution limits and behaviour on Streampixel’s GPU servers are not the same. Test the uploaded build before you release.`})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`create()`}),` rejects before the stream starts:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AuthError`}),`, kind `,_jsx(_components.code,{children:`dev-session-not-found`})]}),_jsxs(_components.td,{children:[`No such dev session, or the session was started for another project than `,_jsx(_components.code,{children:`appId`}),`.`]}),_jsxs(_components.td,{children:[`Check the ID against the session’s row, and that `,_jsx(_components.code,{children:`appId`}),` is the project the session belongs to.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AuthError`}),`, kind `,_jsx(_components.code,{children:`dev-session-expired`})]}),_jsx(_components.td,{children:`The dev session has expired.`}),_jsx(_components.td,{children:`Start a new session in the dashboard, use its ID, and connect Unreal with the new session’s URL or launch argument.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AuthError`}),`, kind `,_jsx(_components.code,{children:`server-ticket-required`})]}),_jsxs(_components.td,{children:[`The project is set to “Your app only” (not available yet), which cannot be opened with `,_jsx(_components.code,{children:`dev`}),`.`]}),_jsx(_components.td,{children:`Switch the project to another access mode while you test locally, or use a second project.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TypeError`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`dev`}),` together with `,_jsx(_components.code,{children:`shared`}),` or `,_jsx(_components.code,{children:`auth: { mode: 'ticket' }`}),`, a `,_jsx(_components.code,{children:`dev.sessionId`}),` that is not a dev session ID, or `,_jsx(_components.code,{children:`dev`}),` without `,_jsx(_components.code,{children:`appId`}),`. The message names the option.`]}),_jsx(_components.td,{children:`Correct the option.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`After the stream started, the session ends with the `,_jsx(_components.code,{children:`ended`}),` event:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4007`})}),_jsx(_components.td,{children:`Unreal stopped and did not come back within 10 minutes.`}),_jsxs(_components.td,{children:[`Start Unreal, then call `,_jsx(_components.code,{children:`create()`}),` again.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`4102`}),`, or `,_jsx(_components.code,{children:`4101`}),` when the video connection never came up`]}),_jsx(_components.td,{children:`No video arrived, also after the SDK rejoined the session three times.`}),_jsxs(_components.td,{children:[`Check that Unreal is rendering and still connected, then call `,_jsx(_components.code,{children:`create()`}),` again.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1008`})}),_jsx(_components.td,{children:`The session expired while the page was open. The stream that was running continued. The next reconnect was refused. The message says to start a new dev session.`}),_jsx(_components.td,{children:`Start a new session and use its ID.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`All other errors and end codes are the same as for a normal session: see `,_jsx(_components.a,{href:`/resources/web-sdk-v2/errors-and-disconnects`,children:`Errors and disconnects`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`The state stays connecting`,id:`the-state-stays-connecting`,children:[_jsx(_components.p,{children:`Unreal has not connected to the session. The page waits without a time limit.`}),_jsxs(_components.p,{children:[`Look at the session’s row in the dashboard. If it does not say `,_jsx(_components.strong,{children:`Connected`}),`, one of these is the cause: the PS1 / PS2 form does not match the plugin, the Pixel Streaming plugin is disabled, port `,_jsx(_components.code,{children:`8888`}),` is blocked, or the session has expired.`]})]}),_jsx(Accordion,{title:`The row says Connected, and the page still waits`,id:`the-row-says-connected-and-the-page-still-waits`,children:_jsx(_components.p,{children:`The page uses the ID of another session than the one Unreal joined. Use the ID from the same row as the URL or launch argument you gave Unreal.`})}),_jsx(Accordion,{title:`The preview link shows the stream, my page does not`,id:`the-preview-link-shows-the-stream-my-page-does-not`,children:_jsxs(_components.p,{children:[`The problem is in the page, not in Unreal. Check the `,_jsx(_components.code,{children:`appId`}),` and `,_jsx(_components.code,{children:`dev.sessionId`}),` passed to `,_jsx(_components.code,{children:`create()`}),`, and what `,_jsx(_components.code,{children:`create()`}),` rejected with.`]})}),_jsx(Accordion,{title:`Nothing appears on my screen after Standalone Game`,id:`nothing-appears-on-my-screen-after-standalone-game`,children:_jsx(_components.p,{children:`That is expected: the game renders off-screen. Open your page, or the preview link.`})}),_jsx(Accordion,{title:`Selected Viewport or New Editor Window does not stream`,id:`selected-viewport-or-new-editor-window-does-not-stream`,children:_jsxs(_components.p,{children:[`Play In Editor ignores the launch argument. Use `,_jsx(_components.strong,{children:`Standalone Game`}),`.`]})}),_jsx(Accordion,{title:`The page asks for a password, or goes to a sign-in page`,id:`the-page-asks-for-a-password-or-goes-to-a-sign-in-page`,children:_jsx(_components.p,{children:`The project’s access mode applies to dev sessions too. Enter the password or sign in, as a viewer would.`})}),_jsx(Accordion,{title:`consoleCommand() returns false while streaming`,id:`consolecommand-returns-false-while-streaming`,children:_jsxs(_components.p,{children:[`The app was not launched with `,_jsx(_components.code,{children:`-AllowPixelStreamingCommands`}),`. The launch argument carries it: paste the launch argument exactly as the dashboard shows it. This applies to `,_jsx(_components.code,{children:`stream.consoleCommand()`}),` and to `,_jsx(_components.code,{children:`stream.emitConsoleCommand()`}),`, which are the same call.`]})}),_jsx(Accordion,{title:`dev-session-not-found for an ID I just copied`,id:`dev-session-not-found-for-an-id-i-just-copied`,children:_jsxs(_components.p,{children:[`The session belongs to another project than `,_jsx(_components.code,{children:`appId`}),`. Start the session from the project whose ID you pass as `,_jsx(_components.code,{children:`appId`}),`.`]})}),_jsx(Accordion,{title:`It worked, and now create() rejects with dev-session-expired`,id:`it-worked-and-now-create-rejects-with-dev-session-expired`,children:_jsx(_components.p,{children:`The 2 hours are over. Start a new session. Unreal needs the new session’s URL or launch argument as well.`})}),_jsx(Accordion,{title:`The session ended with 4007 after I closed Unreal`,id:`the-session-ended-with-4007-after-i-closed-unreal`,children:_jsxs(_components.p,{children:[`More than 10 minutes passed without Unreal. Start Unreal and call `,_jsx(_components.code,{children:`create()`}),` again.`]})}),_jsx(Accordion,{title:`The dashboard says Local dev mode is temporarily unavailable`,id:`the-dashboard-says-local-dev-mode-is-temporarily-unavailable`,children:_jsx(_components.p,{children:`The dev service is being updated. Try again in a few minutes.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Talk to your Unreal app`,icon:`message`,href:`/resources/web-sdk-v2/messaging`,children:_jsx(_components.p,{children:`Send and receive messages: the work a dev session is made for.`})}),_jsx(Card,{title:`Test Locally in the dashboard`,icon:`gauge`,href:`/resources/dashboard/test-locally`,children:_jsx(_components.p,{children:`Start, revoke and read a dev session; the editor and Standalone Game steps in detail.`})}),_jsx(Card,{title:`Reliability`,icon:`shield-halved`,href:`/resources/web-sdk-v2/reliability`,children:_jsx(_components.p,{children:`One level up: the timings behind waiting, reconnecting and rejoining.`})}),_jsx(Card,{title:`Options`,icon:`gear`,href:`/resources/web-sdk-v2/options#dev-test-locally`,children:_jsxs(_components.p,{children:[`Reference: everything `,_jsx(_components.code,{children:`create()`}),` accepts, `,_jsx(_components.code,{children:`dev`}),` included.`]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Test locally","description":"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.","icon":"laptop-code","keywords":["test locally","dev session","dev option","Unreal Editor","Standalone Game","local development","dev-session-expired"],"href":"/resources/web-sdk-v2/test-locally"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"When to use it","slug":"when-to-use-it","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Set it up","slug":"set-it-up","depth":2,"children":[{"title":"Keep the session ID out of your code","slug":"keep-the-session-id-out-of-your-code","depth":3,"children":[]}]},{"title":"What is different in a dev session","slug":"what-is-different-in-a-dev-session","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"streampixel","siteName":"Streampixel","title":"Test locally - Streampixel","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T11:43:40.269Z","originalFileLocation":"resources/web-sdk-v2/test-locally.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Streampixel\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Test locally - Streampixel\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Streampixel\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://streampixel.mintlify.site/_mintlify/api/og/v2?division=Go+further\u0026amp;title=Test+locally\u0026amp;description=Stream+from+Unreal+on+your+own+machine+into+a+Streampixel+Web+SDK+page+with+the+dev+option%3A+start+a+Test+Locally+session%2C+connect+Unreal%2C+pass+the+session+ID%2C+a\u0026amp;theme=fa8dd198406f173c8d20e5ef\u0026amp;signature=5ccb8d539ee4bbeb9372f3b470b060f4c58787ab3ea4aee7f6ce1df3ef3d0537\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Test locally - Streampixel\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://streampixel.mintlify.site/_mintlify/api/og/v2?division=Go+further\u0026amp;title=Test+locally\u0026amp;description=Stream+from+Unreal+on+your+own+machine+into+a+Streampixel+Web+SDK+page+with+the+dev+option%3A+start+a+Test+Locally+session%2C+connect+Unreal%2C+pass+the+session+ID%2C+a\u0026amp;theme=fa8dd198406f173c8d20e5ef\u0026amp;signature=5ccb8d539ee4bbeb9372f3b470b060f4c58787ab3ea4aee7f6ce1df3ef3d0537\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/streampixel/ihpD92PgybcJo_xa/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Streampixel\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00B8E6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/resources/web-sdk-v2/test-locally.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.streampixel.io/#organization\",\"name\":\"Streampixel\",\"url\":\"https://docs.streampixel.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/streampixel/3A9zLaQxhTCIH06h/logo/logo.png?fit=max\u0026auto=format\u0026n=3A9zLaQxhTCIH06h\u0026q=85\u0026s=97d4efed69a7ba6432871781617e39fe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.streampixel.io#website\",\"name\":\"Streampixel\",\"url\":\"https://docs.streampixel.io\",\"publisher\":{\"@id\":\"https://docs.streampixel.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally#webpage\",\"url\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally\",\"name\":\"Test locally\",\"description\":\"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\",\"dateModified\":\"2026-11-16T11:43:40.269Z\",\"isPartOf\":{\"@id\":\"https://docs.streampixel.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Go further\",\"item\":\"https://docs.streampixel.io/resources/web-sdk-v2/events-and-states\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test locally\",\"item\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally#article\",\"headline\":\"Test locally\",\"name\":\"Test locally\",\"description\":\"Stream from Unreal on your own machine into a Streampixel Web SDK page with the dev option: start a Test Locally session, connect Unreal, pass the session ID, and know what differs from a released stream.\",\"url\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally\",\"mainEntityOfPage\":{\"@id\":\"https://docs.streampixel.io/resources/web-sdk-v2/test-locally#webpage\"},\"dateModified\":\"2026-11-16T11:43:40.269Z\",\"keywords\":\"test locally, dev session, dev option, Unreal Editor, Standalone Game, local development, dev-session-expired\",\"publisher\":{\"@id\":\"https://docs.streampixel.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.streampixel.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Streampixel\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Streampixel\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/resources/web-sdk-v2/test-locally.md","siteName":"Streampixel","nav":{"global":{},"tabs":[{"tab":"Get Started","icon":"rocket","pages":[{"title":"Get Started","href":""}]},{"tab":"Dashboard","icon":"gauge","pages":[{"title":"Dashboard","href":"/resources/dashboard/billing"}]},{"tab":"Iframe","icon":"browser","pages":[{"title":"Iframe","href":"/resources/iframe-integration/overview"}]},{"tab":"Web SDK","icon":"code","groups":[{"group":"Start here","icon":"rocket","pages":[{"title":"Web SDK overview","sidebarTitle":"Overview","icon":"rocket","href":"/resources/web-sdk-v2/overview"},{"title":"Your first stream in 5 minutes","sidebarTitle":"Your first stream","icon":"play","href":"/resources/web-sdk-v2/first-stream"},{"title":"How it works","icon":"diagram-project","href":"/resources/web-sdk-v2/how-it-works"}]},{"group":"Build your page","icon":"hammer","pages":[{"title":"Installation","icon":"download","href":"/resources/web-sdk-v2/installation"},{"title":"Quick start","icon":"rocket","href":"/resources/web-sdk-v2/quick-start"},{"title":"Ready-made screens","sidebarTitle":"Ready-made screens","icon":"layer-group","href":"/resources/web-sdk-v2/ui-overlays"},{"title":"Talk to your Unreal app","sidebarTitle":"Talk to your Unreal app","icon":"comments","href":"/resources/web-sdk-v2/messaging"},{"title":"Controls and input","sidebarTitle":"Controls and input","icon":"gamepad","href":"/resources/web-sdk-v2/controls-and-input"}]},{"group":"Go further","icon":"layer-group","pages":[{"title":"Events and states","sidebarTitle":"Events and states","icon":"diagram-project","href":"/resources/web-sdk-v2/events-and-states"},{"title":"Access: public, password, single sign-on","sidebarTitle":"Access","icon":"lock","href":"/resources/web-sdk-v2/access"},{"title":"Errors and disconnects","sidebarTitle":"Errors and disconnects","icon":"triangle-exclamation","href":"/resources/web-sdk-v2/errors-and-disconnects"},{"title":"Shared sessions","icon":"users","href":"/resources/web-sdk-v2/shared-sessions"},{"title":"Voice, text and video chat","sidebarTitle":"Voice chat","description":"Add a Streampixel project's built-in voice, text and video chat to your own page with @streampixel/web-sdk/voice: join a room, show people and messages, and handle microphone and camera.","icon":"microphone","href":"/resources/web-sdk-v2/voice-chat"},{"title":"Test locally","icon":"laptop-code","href":"/resources/web-sdk-v2/test-locally"},{"title":"Cookbook","sidebarTitle":"Cookbook","description":"Short, complete recipes for the Streampixel Web SDK: your own loading screen, a queue display, a reconnecting banner, an idle warning, a React hook, a start button, a stats readout and screenshots.","icon":"utensils","href":"/resources/web-sdk-v2/cookbook"}]},{"group":"Under the hood","icon":"cog","pages":[{"title":"The engine and updates","sidebarTitle":"Engine and updates","icon":"cloud-arrow-down","href":"/resources/web-sdk-v2/engine-and-updates"},{"title":"Reliability","sidebarTitle":"Reliability","icon":"shield-halved","href":"/resources/web-sdk-v2/reliability"},{"title":"Diagnostics","sidebarTitle":"Diagnostics","icon":"stethoscope","href":"/resources/web-sdk-v2/diagnostics"}]},{"group":"Reference","icon":"book-open","pages":[{"title":"Options reference","sidebarTitle":"Options","icon":"gear","href":"/resources/web-sdk-v2/options"},{"title":"Stream methods and properties","sidebarTitle":"Stream methods","icon":"code","href":"/resources/web-sdk-v2/stream-api"},{"title":"Web SDK FAQ","sidebarTitle":"FAQ","icon":"circle-question","href":"/resources/web-sdk-v2/faq"},{"title":"Web SDK changelog","sidebarTitle":"Changelog","icon":"clock-rotate-left","href":"/resources/web-sdk-v2/changelog"}]},{"group":"Upgrading","icon":"arrow-right-arrow-left","pages":[{"title":"Migrating from v1","sidebarTitle":"Migrating from v1","icon":"arrow-right-arrow-left","href":"/resources/web-sdk-v2/migration"}]}]},{"tab":"REST API","icon":"webhook","pages":[{"title":"REST API","href":"/resources/api-reference/overview"}]},{"tab":"Guides \u0026 Reference","icon":"book","pages":[{"title":"Guides \u0026 Reference","href":"/resources/recipes/overview"}]}]},"basePath":"","title":"Test locally - Streampixel","buildId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","deploymentId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","dynamics":[],"chunks":[]}