main
Entry point of the wish dashboard.
Probes /api/status for the server's streaming mode and dual-mode flag,
publishes them as window.__SELKIES_STREAMING_MODE__ and
window.__SELKIES_DUAL_MODE__, 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..#player4 hashes, and nothing
for #shared.
Functions
detectInitialMode()
function detectInitialMode(): Promise<void>;Defined in: main.jsx:39
Asks the server for the active streaming mode so the core (deferred via the
inline flag in index.html) initializes into the right transport even when
localStorage disagrees with the server. Also publishes whether the server
permits switching transports, so the dashboard can show the
WebSocket/WebRTC toggle before serverSettings arrive over the stream;
otherwise a WebRTC session that never connects would leave no visible way
back to WebSockets.
Returns
Promise<void>
waitForCore()
function waitForCore(timeoutMs?): Promise<void>;Defined in: main.jsx:66
Waits for the core, which arrives as a separate runtime script and is never bundled here, to expose its deferred entry point.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
timeoutMs? | number | 10000 | Give-up deadline in milliseconds. |
Returns
Promise<void>
Throws
When the core has not loaded by the deadline.