import { cn } from "@/lib/utils"; import { PlayerStatsType } from "@/types/live"; type PlayerStatsProps = { stats: PlayerStatsType; minimal: boolean; }; export function PlayerStats({ stats, minimal }: PlayerStatsProps) { const fullStatsContent = ( <>
Stream Type:{" "} {stats.streamType}
Bandwidth:{" "} {stats.bandwidth.toFixed(2)} kbps
{stats.latency != undefined && (Latency:{" "} 2 ? "text-danger" : ""}`} > {stats.latency.toFixed(2)} seconds
)}Total Frames:{" "} {stats.totalFrames}
{stats.droppedFrames != undefined && (Dropped Frames:{" "} {stats.droppedFrames}
)} {stats.decodedFrames != undefined && (Decoded Frames:{" "} {stats.decodedFrames}
)} {stats.droppedFrameRate != undefined && (Dropped Frame Rate:{" "} {stats.droppedFrameRate.toFixed(2)}%
)} > ); const minimalStatsContent = (