mirror of https://github.com/jetkvm/kvm.git
Merge 5acfb67d29
into d952480c2a
This commit is contained in:
commit
41aeb59adb
|
@ -0,0 +1,167 @@
|
||||||
|
import { ComponentProps } from "react";
|
||||||
|
import { cva, cx } from "cva";
|
||||||
|
|
||||||
|
import { GridCard } from "./Card";
|
||||||
|
import StatChart from "./StatChart";
|
||||||
|
|
||||||
|
interface ChartPoint {
|
||||||
|
date: number;
|
||||||
|
stat: number | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MetricProps<T, K extends keyof T> {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
stream?: Map<number, T>;
|
||||||
|
metric?: K;
|
||||||
|
data?: ChartPoint[];
|
||||||
|
gate?: Map<number, unknown>;
|
||||||
|
supported?: boolean;
|
||||||
|
map?: (p: { date: number; stat: T[K] | null }) => ChartPoint;
|
||||||
|
domain?: [number, number];
|
||||||
|
unit?: string;
|
||||||
|
heightClassName?: string;
|
||||||
|
referenceValue?: number;
|
||||||
|
badge?: ComponentProps<typeof MetricHeader>["badge"];
|
||||||
|
badgeTheme?: ComponentProps<typeof MetricHeader>["badgeTheme"];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createChartArray<T, K extends keyof T>(
|
||||||
|
stream: Map<number, T>,
|
||||||
|
metric: K,
|
||||||
|
): { date: number; stat: T[K] | null }[] {
|
||||||
|
const stat = Array.from(stream).map(([key, stats]) => {
|
||||||
|
return { date: key, stat: stats[metric] };
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort the dates to ensure they are in chronological order
|
||||||
|
const sortedStat = stat.map(x => x.date).sort((a, b) => a - b);
|
||||||
|
|
||||||
|
// Determine the earliest statistic date
|
||||||
|
const earliestStat = sortedStat[0];
|
||||||
|
|
||||||
|
// Current time in seconds since the Unix epoch
|
||||||
|
const now = Math.floor(Date.now() / 1000);
|
||||||
|
|
||||||
|
// Determine the starting point for the chart data
|
||||||
|
const firstChartDate = earliestStat ? Math.min(earliestStat, now - 120) : now - 120;
|
||||||
|
|
||||||
|
// Generate the chart array for the range between 'firstChartDate' and 'now'
|
||||||
|
return Array.from({ length: now - firstChartDate }, (_, i) => {
|
||||||
|
const currentDate = firstChartDate + i;
|
||||||
|
return {
|
||||||
|
date: currentDate,
|
||||||
|
// Find the statistic for 'currentDate', or use the last known statistic if none exists for that date
|
||||||
|
stat: stat.find(x => x.date === currentDate)?.stat ?? null,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const theme = {
|
||||||
|
light:
|
||||||
|
"bg-white text-black border border-slate-800/20 dark:border dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300",
|
||||||
|
danger: "bg-red-500 dark:border-red-700 dark:bg-red-800 dark:text-red-50",
|
||||||
|
primary: "bg-blue-500 dark:border-blue-700 dark:bg-blue-800 dark:text-blue-50",
|
||||||
|
};
|
||||||
|
|
||||||
|
interface SettingsItemProps {
|
||||||
|
readonly title: string;
|
||||||
|
readonly description: string | React.ReactNode;
|
||||||
|
readonly badge?: string;
|
||||||
|
readonly className?: string;
|
||||||
|
readonly children?: React.ReactNode;
|
||||||
|
readonly badgeTheme?: keyof typeof theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MetricHeader(props: SettingsItemProps) {
|
||||||
|
const { title, description, badge } = props;
|
||||||
|
const badgeVariants = cva({ variants: { theme: theme } });
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<div className="flex items-center gap-x-2">
|
||||||
|
<div className="flex w-full items-center justify-between text-base font-semibold text-black dark:text-white">
|
||||||
|
{title}
|
||||||
|
{badge && (
|
||||||
|
<span
|
||||||
|
className={cx(
|
||||||
|
"ml-2 rounded-sm px-2 py-1 font-mono text-[10px] leading-none font-medium",
|
||||||
|
badgeVariants({ theme: props.badgeTheme ?? "light" }),
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{badge}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="text-sm text-slate-700 dark:text-slate-300">{description}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Metric<T, K extends keyof T>({
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
stream,
|
||||||
|
metric,
|
||||||
|
data,
|
||||||
|
gate,
|
||||||
|
supported,
|
||||||
|
map,
|
||||||
|
domain = [0, 600],
|
||||||
|
unit = "",
|
||||||
|
heightClassName = "h-[127px]",
|
||||||
|
referenceValue,
|
||||||
|
badge,
|
||||||
|
badgeTheme,
|
||||||
|
}: MetricProps<T, K>) {
|
||||||
|
const ready = gate ? gate.size > 0 : stream ? stream.size > 0 : true;
|
||||||
|
const supportedFinal =
|
||||||
|
supported ??
|
||||||
|
(stream && metric
|
||||||
|
? Array.from(stream).some(([, s]) => s[metric] !== undefined)
|
||||||
|
: true);
|
||||||
|
|
||||||
|
const raw = stream && metric ? createChartArray(stream, metric) : [];
|
||||||
|
const dataFinal: ChartPoint[] =
|
||||||
|
data ??
|
||||||
|
(map
|
||||||
|
? raw.map(map)
|
||||||
|
: raw.map(x => ({
|
||||||
|
date: x.date,
|
||||||
|
stat: typeof x.stat === "number" ? (x.stat as unknown as number) : null,
|
||||||
|
})));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<MetricHeader
|
||||||
|
title={title}
|
||||||
|
description={description}
|
||||||
|
badge={badge}
|
||||||
|
badgeTheme={badgeTheme}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<GridCard>
|
||||||
|
<div
|
||||||
|
className={`flex ${heightClassName} w-full items-center justify-center text-sm text-slate-500`}
|
||||||
|
>
|
||||||
|
{!ready ? (
|
||||||
|
<div className="flex flex-col items-center space-y-1">
|
||||||
|
<p className="text-slate-700">Waiting for data...</p>
|
||||||
|
</div>
|
||||||
|
) : supportedFinal ? (
|
||||||
|
<StatChart
|
||||||
|
data={dataFinal}
|
||||||
|
domain={domain}
|
||||||
|
unit={unit}
|
||||||
|
referenceValue={referenceValue}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="flex flex-col items-center space-y-1">
|
||||||
|
<p className="text-black">Metric not supported</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</GridCard>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,45 +1,14 @@
|
||||||
import { useInterval } from "usehooks-ts";
|
import { useInterval } from "usehooks-ts";
|
||||||
|
|
||||||
import SidebarHeader from "@/components/SidebarHeader";
|
import SidebarHeader from "@/components/SidebarHeader";
|
||||||
import { GridCard } from "@/components/Card";
|
|
||||||
import { useRTCStore, useUiStore } from "@/hooks/stores";
|
import { useRTCStore, useUiStore } from "@/hooks/stores";
|
||||||
import StatChart from "@/components/StatChart";
|
|
||||||
|
|
||||||
function createChartArray<T, K extends keyof T>(
|
import { createChartArray, Metric } from "../Metric";
|
||||||
stream: Map<number, T>,
|
import { SettingsSectionHeader } from "../SettingsSectionHeader";
|
||||||
metric: K,
|
|
||||||
): { date: number; stat: T[K] | null }[] {
|
|
||||||
const stat = Array.from(stream).map(([key, stats]) => {
|
|
||||||
return { date: key, stat: stats[metric] };
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sort the dates to ensure they are in chronological order
|
|
||||||
const sortedStat = stat.map(x => x.date).sort((a, b) => a - b);
|
|
||||||
|
|
||||||
// Determine the earliest statistic date
|
|
||||||
const earliestStat = sortedStat[0];
|
|
||||||
|
|
||||||
// Current time in seconds since the Unix epoch
|
|
||||||
const now = Math.floor(Date.now() / 1000);
|
|
||||||
|
|
||||||
// Determine the starting point for the chart data
|
|
||||||
const firstChartDate = earliestStat ? Math.min(earliestStat, now - 120) : now - 120;
|
|
||||||
|
|
||||||
// Generate the chart array for the range between 'firstChartDate' and 'now'
|
|
||||||
return Array.from({ length: now - firstChartDate }, (_, i) => {
|
|
||||||
const currentDate = firstChartDate + i;
|
|
||||||
return {
|
|
||||||
date: currentDate,
|
|
||||||
// Find the statistic for 'currentDate', or use the last known statistic if none exists for that date
|
|
||||||
stat: stat.find(x => x.date === currentDate)?.stat ?? null,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ConnectionStatsSidebar() {
|
export default function ConnectionStatsSidebar() {
|
||||||
const inboundRtpStats = useRTCStore(state => state.inboundRtpStats);
|
const inboundVideoRtpStats = useRTCStore(state => state.inboundRtpStats);
|
||||||
|
const iceCandidatePairStats = useRTCStore(state => state.candidatePairStats);
|
||||||
const candidatePairStats = useRTCStore(state => state.candidatePairStats);
|
|
||||||
const setSidebarView = useUiStore(state => state.setSidebarView);
|
const setSidebarView = useUiStore(state => state.setSidebarView);
|
||||||
|
|
||||||
function isMetricSupported<T, K extends keyof T>(
|
function isMetricSupported<T, K extends keyof T>(
|
||||||
|
@ -49,7 +18,7 @@ export default function ConnectionStatsSidebar() {
|
||||||
return Array.from(stream).some(([, stat]) => stat[metric] !== undefined);
|
return Array.from(stream).some(([, stat]) => stat[metric] !== undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
const appendInboundRtpStats = useRTCStore(state => state.appendInboundRtpStats);
|
const appendInboundVideoRtpStats = useRTCStore(state => state.appendInboundRtpStats);
|
||||||
const appendIceCandidatePair = useRTCStore(state => state.appendCandidatePairStats);
|
const appendIceCandidatePair = useRTCStore(state => state.appendCandidatePairStats);
|
||||||
const appendDiskDataChannelStats = useRTCStore(
|
const appendDiskDataChannelStats = useRTCStore(
|
||||||
state => state.appendDiskDataChannelStats,
|
state => state.appendDiskDataChannelStats,
|
||||||
|
@ -66,15 +35,13 @@ export default function ConnectionStatsSidebar() {
|
||||||
useInterval(function collectWebRTCStats() {
|
useInterval(function collectWebRTCStats() {
|
||||||
(async () => {
|
(async () => {
|
||||||
if (!mediaStream) return;
|
if (!mediaStream) return;
|
||||||
const videoTrack = mediaStream.getVideoTracks()[0];
|
|
||||||
if (!videoTrack) return;
|
|
||||||
const stats = await peerConnection?.getStats();
|
const stats = await peerConnection?.getStats();
|
||||||
let successfulLocalCandidateId: string | null = null;
|
let successfulLocalCandidateId: string | null = null;
|
||||||
let successfulRemoteCandidateId: string | null = null;
|
let successfulRemoteCandidateId: string | null = null;
|
||||||
|
|
||||||
stats?.forEach(report => {
|
stats?.forEach(report => {
|
||||||
if (report.type === "inbound-rtp") {
|
if (report.type === "inbound-rtp" && report.kind === "video") {
|
||||||
appendInboundRtpStats(report);
|
appendInboundVideoRtpStats(report);
|
||||||
} else if (report.type === "candidate-pair" && report.nominated) {
|
} else if (report.type === "candidate-pair" && report.nominated) {
|
||||||
if (report.state === "succeeded") {
|
if (report.state === "succeeded") {
|
||||||
successfulLocalCandidateId = report.localCandidateId;
|
successfulLocalCandidateId = report.localCandidateId;
|
||||||
|
@ -98,144 +65,139 @@ export default function ConnectionStatsSidebar() {
|
||||||
})();
|
})();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
const jitterBufferDelay = createChartArray(inboundVideoRtpStats, "jitterBufferDelay");
|
||||||
|
const jitterBufferEmittedCount = createChartArray(
|
||||||
|
inboundVideoRtpStats,
|
||||||
|
"jitterBufferEmittedCount",
|
||||||
|
);
|
||||||
|
|
||||||
|
const jitterBufferAvgDelayData = jitterBufferDelay.map((d, idx) => {
|
||||||
|
if (idx === 0) return { date: d.date, stat: null };
|
||||||
|
const prevDelay = jitterBufferDelay[idx - 1]?.stat as number | null | undefined;
|
||||||
|
const currDelay = d.stat as number | null | undefined;
|
||||||
|
const prevEmitted =
|
||||||
|
(jitterBufferEmittedCount[idx - 1]?.stat as number | null | undefined) ?? null;
|
||||||
|
const currEmitted =
|
||||||
|
(jitterBufferEmittedCount[idx]?.stat as number | null | undefined) ?? null;
|
||||||
|
|
||||||
|
if (
|
||||||
|
prevDelay == null ||
|
||||||
|
currDelay == null ||
|
||||||
|
prevEmitted == null ||
|
||||||
|
currEmitted == null
|
||||||
|
) {
|
||||||
|
return { date: d.date, stat: null };
|
||||||
|
}
|
||||||
|
|
||||||
|
const deltaDelay = currDelay - prevDelay;
|
||||||
|
const deltaEmitted = currEmitted - prevEmitted;
|
||||||
|
|
||||||
|
// Guard counter resets or no emitted frames
|
||||||
|
if (deltaDelay < 0 || deltaEmitted <= 0) {
|
||||||
|
return { date: d.date, stat: null };
|
||||||
|
}
|
||||||
|
|
||||||
|
const valueMs = Math.round((deltaDelay / deltaEmitted) * 1000);
|
||||||
|
return { date: d.date, stat: valueMs };
|
||||||
|
});
|
||||||
|
|
||||||
|
// Rolling average over the last N seconds for the reference line
|
||||||
|
const rollingWindowSeconds = 20;
|
||||||
|
const recent = jitterBufferAvgDelayData
|
||||||
|
.slice(-rollingWindowSeconds)
|
||||||
|
.filter(x => x.stat != null) as { date: number; stat: number }[];
|
||||||
|
const referenceValue =
|
||||||
|
recent.length > 0
|
||||||
|
? Math.round(recent.reduce((sum, x) => sum + (x.stat as number), 0) / recent.length)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid h-full grid-rows-(--grid-headerBody) shadow-xs">
|
<div className="grid h-full grid-rows-(--grid-headerBody) shadow-xs">
|
||||||
<SidebarHeader title="Connection Stats" setSidebarView={setSidebarView} />
|
<SidebarHeader title="Connection Stats" setSidebarView={setSidebarView} />
|
||||||
<div className="h-full space-y-4 overflow-y-scroll bg-white px-4 py-2 pb-8 dark:bg-slate-900">
|
<div className="h-full space-y-4 overflow-y-scroll bg-white px-4 py-2 pb-8 dark:bg-slate-900">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{/*
|
|
||||||
The entire sidebar component is always rendered, with a display none when not visible
|
|
||||||
The charts below, need a height and width, otherwise they throw. So simply don't render them unless the thing is visible
|
|
||||||
*/}
|
|
||||||
{sidebarView === "connection-stats" && (
|
{sidebarView === "connection-stats" && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-8">
|
||||||
<div className="space-y-2">
|
{/* Connection Group */}
|
||||||
<div>
|
<div className="space-y-3">
|
||||||
<h2 className="text-lg font-semibold text-black dark:text-white">
|
<SettingsSectionHeader
|
||||||
Packets Lost
|
title="Connection"
|
||||||
</h2>
|
description="The connection between the client and the JetKVM."
|
||||||
<p className="text-sm text-slate-700 dark:text-slate-300">
|
|
||||||
Number of data packets lost during transmission.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<GridCard>
|
|
||||||
<div className="flex h-[127px] w-full items-center justify-center text-sm text-slate-500">
|
|
||||||
{inboundRtpStats.size === 0 ? (
|
|
||||||
<div className="flex flex-col items-center space-y-1">
|
|
||||||
<p className="text-slate-700">Waiting for data...</p>
|
|
||||||
</div>
|
|
||||||
) : isMetricSupported(inboundRtpStats, "packetsLost") ? (
|
|
||||||
<StatChart
|
|
||||||
data={createChartArray(inboundRtpStats, "packetsLost")}
|
|
||||||
domain={[0, 100]}
|
|
||||||
unit=" packets"
|
|
||||||
/>
|
/>
|
||||||
) : (
|
<Metric
|
||||||
<div className="flex flex-col items-center space-y-1">
|
title="Round-Trip Time"
|
||||||
<p className="text-black">Metric not supported</p>
|
description="Round-trip time for the active ICE candidate pair between peers."
|
||||||
</div>
|
stream={iceCandidatePairStats}
|
||||||
)}
|
gate={inboundVideoRtpStats}
|
||||||
</div>
|
metric="currentRoundTripTime"
|
||||||
</GridCard>
|
map={x => ({
|
||||||
</div>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div>
|
|
||||||
<h2 className="text-lg font-semibold text-black dark:text-white">
|
|
||||||
Round-Trip Time
|
|
||||||
</h2>
|
|
||||||
<p className="text-sm text-slate-700 dark:text-slate-300">
|
|
||||||
Time taken for data to travel from source to destination and back
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<GridCard>
|
|
||||||
<div className="flex h-[127px] w-full items-center justify-center text-sm text-slate-500">
|
|
||||||
{inboundRtpStats.size === 0 ? (
|
|
||||||
<div className="flex flex-col items-center space-y-1">
|
|
||||||
<p className="text-slate-700">Waiting for data...</p>
|
|
||||||
</div>
|
|
||||||
) : isMetricSupported(candidatePairStats, "currentRoundTripTime") ? (
|
|
||||||
<StatChart
|
|
||||||
data={createChartArray(
|
|
||||||
candidatePairStats,
|
|
||||||
"currentRoundTripTime",
|
|
||||||
).map(x => {
|
|
||||||
return {
|
|
||||||
date: x.date,
|
date: x.date,
|
||||||
stat: x.stat ? Math.round(x.stat * 1000) : null,
|
stat: x.stat ? Math.round((x.stat as number) * 1000) : null,
|
||||||
};
|
|
||||||
})}
|
})}
|
||||||
domain={[0, 600]}
|
domain={[0, 600]}
|
||||||
unit=" ms"
|
unit=" ms"
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<div className="flex flex-col items-center space-y-1">
|
|
||||||
<p className="text-black">Metric not supported</p>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
{/* Video Group */}
|
||||||
</GridCard>
|
<div className="space-y-3">
|
||||||
</div>
|
<SettingsSectionHeader
|
||||||
<div className="space-y-2">
|
title="Video"
|
||||||
<div>
|
description="The video stream from the JetKVM to the client."
|
||||||
<h2 className="text-lg font-semibold text-black dark:text-white">
|
/>
|
||||||
Jitter
|
|
||||||
</h2>
|
{/* RTP Jitter */}
|
||||||
<p className="text-sm text-slate-700 dark:text-slate-300">
|
<Metric
|
||||||
Variation in packet delay, affecting video smoothness.{" "}
|
title="Network Stability"
|
||||||
</p>
|
badge="Jitter"
|
||||||
</div>
|
badgeTheme="light"
|
||||||
<GridCard>
|
description="How steady the flow of inbound video packets is across the network."
|
||||||
<div className="flex h-[127px] w-full items-center justify-center text-sm text-slate-500">
|
stream={inboundVideoRtpStats}
|
||||||
{inboundRtpStats.size === 0 ? (
|
metric="jitter"
|
||||||
<div className="flex flex-col items-center space-y-1">
|
map={x => ({
|
||||||
<p className="text-slate-700">Waiting for data...</p>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<StatChart
|
|
||||||
data={createChartArray(inboundRtpStats, "jitter").map(x => {
|
|
||||||
return {
|
|
||||||
date: x.date,
|
date: x.date,
|
||||||
stat: x.stat ? Math.round(x.stat * 1000) : null,
|
stat: x.stat ? Math.round((x.stat as number) * 1000) : null,
|
||||||
};
|
|
||||||
})}
|
})}
|
||||||
domain={[0, 300]}
|
domain={[0, 10]}
|
||||||
unit=" ms"
|
unit=" ms"
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
{/* Playback Delay */}
|
||||||
</GridCard>
|
<Metric
|
||||||
</div>
|
title="Playback Delay"
|
||||||
<div className="space-y-2">
|
description="Delay added by the jitter buffer to smooth playback when frames arrive unevenly."
|
||||||
<div>
|
badge="Jitter Buffer Avg. Delay"
|
||||||
<h2 className="text-lg font-semibold text-black dark:text-white">
|
badgeTheme="light"
|
||||||
Frames per second
|
data={jitterBufferAvgDelayData}
|
||||||
</h2>
|
gate={inboundVideoRtpStats}
|
||||||
<p className="text-sm text-slate-700 dark:text-slate-300">
|
supported={
|
||||||
Number of video frames displayed per second.
|
isMetricSupported(inboundVideoRtpStats, "jitterBufferDelay") &&
|
||||||
</p>
|
isMetricSupported(inboundVideoRtpStats, "jitterBufferEmittedCount")
|
||||||
</div>
|
}
|
||||||
<GridCard>
|
domain={[0, 30]}
|
||||||
<div className="flex h-[127px] w-full items-center justify-center text-sm text-slate-500">
|
unit=" ms"
|
||||||
{inboundRtpStats.size === 0 ? (
|
referenceValue={referenceValue}
|
||||||
<div className="flex flex-col items-center space-y-1">
|
/>
|
||||||
<p className="text-slate-700">Waiting for data...</p>
|
|
||||||
</div>
|
{/* Packets Lost */}
|
||||||
) : (
|
<Metric
|
||||||
<StatChart
|
title="Packets Lost"
|
||||||
data={createChartArray(inboundRtpStats, "framesPerSecond").map(
|
description="Count of lost inbound video RTP packets."
|
||||||
x => {
|
stream={inboundVideoRtpStats}
|
||||||
return {
|
metric="packetsLost"
|
||||||
date: x.date,
|
domain={[0, 100]}
|
||||||
stat: x.stat ? x.stat : null,
|
unit=" packets"
|
||||||
};
|
/>
|
||||||
},
|
|
||||||
)}
|
{/* Frames Per Second */}
|
||||||
|
<Metric
|
||||||
|
title="Frames per second"
|
||||||
|
description="Number of inbound video frames displayed per second."
|
||||||
|
stream={inboundVideoRtpStats}
|
||||||
|
metric="framesPerSecond"
|
||||||
domain={[0, 80]}
|
domain={[0, 80]}
|
||||||
unit=" fps"
|
unit=" fps"
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</GridCard>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue