Selkies

lib/held-settings

Settings a tab holds in place of its user's picks: what a fallback chose (the WebSockets core's encoder fallbacks and crash ladder), and what a display the page shares with another one streams with (display_settings). A held value is stored where the pick is, so the settings payloads and the dashboard read it, and the pick it replaces is kept under <key>_pick (empty for none); the tab is marked in its own sessionStorage, so its reloads keep the hold, while any other tab or later visit puts the picks back. Both cores name the same keys, so a tab that switches transports keeps its holds.

Variables

DISPLAY_SETTINGS

const DISPLAY_SETTINGS: string[];

Defined in: lib/held-settings.js:20

What a display streams with, as display_settings carries it.


CRASH_SAFE_SETTINGS

const CRASH_SAFE_SETTINGS: object;

Defined in: lib/held-settings.js:29

The settings the WebSockets core's crash ladder resets, with their safe values (null clears the setting). A setting the user picks again in the crashing tab is theirs, which ends its hold (releaseHeldSettings).

Type Declaration

video_fullcolor
video_fullcolor: string = 'false';
video_10bit
video_10bit: string = 'false';
framerate
framerate: string = '60';
video_crf
video_crf: string = '25';
manual_resolution
manual_resolution: string = 'false';
manual_width
manual_width: any = null;
manual_height
manual_height: any = null;

HELD_SETTINGS

const HELD_SETTINGS: string[];

Defined in: lib/held-settings.js:34

Every setting but the encoder a tab can hold.

Functions

holdKeys()

function holdKeys(keyFor, appName): object;

Defined in: lib/held-settings.js:43

The storage keys a page's holds live under.

Parameters

ParameterTypeDescription
keyFor(arg0) => stringA setting's storage key.
appNamestringThe storage namespace.

Returns

object

encoderPick
encoderPick: string;
fallbackTab
fallbackTab: string;
displayTab
displayTab: string;

pickKeyFor()

function pickKeyFor(keyFor, name): string;

Defined in: lib/held-settings.js:50

The key a setting's pick is kept under while a hold stands in for it.

Parameters

ParameterType
keyForany
nameany

Returns

string


restoreHeldPicks()

function restoreHeldPicks(keyFor, appName): void;

Defined in: lib/held-settings.js:57

Puts the picks back in a tab that holds nothing: a new tab, or a later visit.

Parameters

ParameterTypeDescription
keyFor(arg0) => string-
appNamestring-

Returns

void


holdDisplaySettings()

function holdDisplaySettings(
   keyFor, 
   appName, 
   values, 
   stamp
): object;

Defined in: lib/held-settings.js:81

Holds what this page's display streams with for its tab, keeping the picks it replaces.

Parameters

ParameterTypeDescription
keyFor(arg0) => string-
appNamestring-
values{ }A display_settings payload.
stampstringThe tab's mark: when and why.

Returns

object

The values that differ from what the tab held.


releaseHeldSettings()

function releaseHeldSettings(keyFor, names): void;

Defined in: lib/held-settings.js:108

Ends the hold of each setting in names: the user picked it.

Parameters

ParameterTypeDescription
keyFor(arg0) => string-
namesstring[]-

Returns

void