Selkies
Developer ReferenceDashboardComponents

components/StreamStats

The sidebar's stats: what the stream runs on, the graphs that grow while the section stays open, the figures under them and the host's meters.

Everything drawn comes from the core's window.stream_info, window.stream_client and window.stream_stats (selkies-web-core/lib/stream-stats.js), read once a second and only while the section is on screen; what a row says and when it warns is lib/stream-stats-view.js, shared with the wish dashboard. Being on screen is what turns the numbers on: the component posts statsOpen to the core, which asks the server for them, and posts it again with open: false when the section folds, the sidebar shuts or the tab hides.

Functions

StatusIcon()

function StatusIcon(__namedParameters): Element;

Defined in: components/StreamStats.jsx:42

The mark beside a row: its state as a shape, so color never carries it alone.

Parameters

ParameterType
__namedParameters{ status: any; }
__namedParameters.statusany

Returns

Element


UplinkIcon()

function UplinkIcon(__namedParameters): Element;

Defined in: components/StreamStats.jsx:60

Names an uplink row by its device, as the sidebar's own toggles do.

Parameters

ParameterType
__namedParameters{ kind: any; }
__namedParameters.kindany

Returns

Element


Graph()

function Graph(props): Element;

Defined in: components/StreamStats.jsx:71

One graph: its name, the value under the pointer or else the newest, and up to two series against one axis whose top is max.

Parameters

ParameterTypeDescription
props{ label: string; unit: string; series: object[]; max: number; }-
props.labelstring-
props.unitstring-
props.seriesobject[]-
props.maxnumber-

Returns

Element


axisTop()

function axisTop(floor, ...lists): number;

Defined in: components/StreamStats.jsx:126

The top of a graph's axis: the largest value drawn with a little headroom, never under floor.

Parameters

ParameterType
floorany
...listsany[]

Returns

number


StreamStats()

function StreamStats(props): Element;

Defined in: components/StreamStats.jsx:133

Parameters

ParameterTypeDescription
props{ t: (arg0, arg1) => string; active: boolean; framerate: number; }active is whether the section is unfolded in an open sidebar; framerate is the configured rate, the floor of the fps axis.
props.t(arg0, arg1) => string-
props.activeboolean-
props.frameratenumber-

Returns

Element

References

StreamStats

Re-exports StreamStats

On this page

Edit on GitHub