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
| Parameter | Type |
|---|---|
__namedParameters | { status: any; } |
__namedParameters.status | any |
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
| Parameter | Type |
|---|---|
__namedParameters | { kind: any; } |
__namedParameters.kind | any |
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
| Parameter | Type | Description |
|---|---|---|
props | { label: string; unit: string; series: object[]; max: number; } | - |
props.label | string | - |
props.unit | string | - |
props.series | object[] | - |
props.max | number | - |
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
| Parameter | Type |
|---|---|
floor | any |
...lists | any[] |
Returns
number
StreamStats()
function StreamStats(props): Element;Defined in: components/StreamStats.jsx:133
Parameters
| Parameter | Type | Description |
|---|---|---|
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.active | boolean | - |
props.framerate | number | - |
Returns
Element
References
StreamStats
Re-exports StreamStats