Set up the Web SDK

You have most likely already opened the demo, seen what it does, and decided the Eagle 3D Streaming Web SDK is how you want to embed your application. If so, this is the page for you: get the code, point it at your app, and run it.

Get the source code

github.com/e3ds/pixelstreaming-sdk — the source code of the demo you just used. Not a cut-down sample: it is the same code, running.

Get it streaming your app before you move anything into your own web project. It is a working integration, so anything that fails is your configuration rather than your code — a far smaller thing to debug than both at once.

What is in it

index.html                       the page itself
css/style.css                    styles the demo's buttons only
scripts/
├── sdk-config.js                the only file you must edit
├── sdk-token.js                 gets a token, starts the session
├── sdk-callbacks.js             every callback, documented
├── demo-ui-controls.js          the demo's buttons
├── demo-ui-connection-setup.js  the demo's settings dialog
└── dist/e3dsCore.min_ns.js      the SDK itself (generated, never edit)

sdk-* is the integration — those files, plus dist/, are what goes into your own web project. You can write your own from scratch against the same API, but copying these across is the quicker path and they are already correct.

demo-ui-* is the demo wrapped around it, and css/style.css styles only those buttons. If you are building your own interface you need none of the three.

Configure it

Everything you change is in scripts/sdk-config.js. It is the only file you have to edit.

What you must set

SettingSet it to
STREAMING_API_KEY Your Streaming API key — see below.
application.userName The account that owns the app.
application.appName The app's name, exactly as the Control Panel shows it, capitalisation included.
application.configurationName Which stored configuration to launch.

What you can leave alone

SettingDefault, and when to change it
application.version "latest" uses the newest build. Set a specific version only when you need to pin one.
application.domain connector.eagle3dstreaming.com for everyone on the shared Eagle 3D Streaming platform. Enterprise only — see below.
tokenExpiryMs 60000. The token only has to last long enough to start the session.
configurationToOverride Empty. Per-session overrides of the stored configuration; it does not change the saved one.

Run it

Double-click index.html. That is the step — no server, no build, no install. The stream starts by itself. Press F12 to watch the session progress in the console.

Opening it straight from disk works because the token endpoint sends Access-Control-Allow-Origin: *, which accepts the null origin a file:// page has.

Your application is now streaming on your own machine, from a file on your disk. No server was involved, and nothing was uploaded.

Script order is not arbitrary

<script defer src="./scripts/dist/e3dsCore.min_ns.js"></script>
<script defer src="./scripts/sdk-config.js"></script>
<script defer src="./scripts/demo-ui-connection-setup.js"></script>  <!-- the demo's settings dialog -->
<script defer src="./scripts/sdk-callbacks.js"></script>
<script defer src="./scripts/demo-ui-controls.js"></script>
<script defer src="./scripts/sdk-token.js"></script>

Moving it into your own application

Carry sdk-config.js, sdk-token.js, sdk-callbacks.js and dist/ across. Leave demo-ui-* and css/style.css behind — they are the demo's interface, and you are writing your own.

When you are ready for other people to open it, that is the next job: serving the page.


In this section

Last updated