Selkies

main

Entry point of the dashboard.

Probes /api/status for the server's streaming mode, dual-mode flag, and layout, publishes them as window.__SELKIES_STREAMING_MODE__, window.__SELKIES_DUAL_MODE__, window.__SELKIES_UI_LAYOUT__, and window.__SELKIES_UI_LAYOUT_ALLOWED__, waits for the runtime-served core script to expose window.selkiesCoreInitialize and starts it, then mounts the dashboard: the full App under #root for the primary display, only the floating gamepad button for the #player2 to #player4 hashes, and the same button once touch is detected for #shared. The touch gamepad is bundled straight from the universal-touch-gamepad addon, so a fresh checkout builds without a vendored copy.

Functions

detectInitialMode()

function detectInitialMode(): Promise<void>;

Defined in: main.tsx:50

Asks the server for the active streaming mode so the core initializes into the right transport even when localStorage disagrees with the server, whether it permits switching transports, so the dashboard can show the WebSocket/WebRTC toggle before serverSettings arrive over the stream, and which layout it names and allows, so the first paint is the right one and a locked layout shows no toggle.

Returns

Promise<void>


waitForCore()

function waitForCore(timeoutMs?): Promise<void>;

Defined in: main.tsx:70

Waits for the core, which arrives as a separate runtime script and is never bundled here, to expose its deferred entry point.

Parameters

ParameterTypeDefault valueDescription
timeoutMs?number10000Give-up deadline in milliseconds.

Returns

Promise<void>

Throws

When the core has not loaded by the deadline.