import { LatencyTest } from './LatencyTest'; import { LatencyInfo, PixelStreaming, PixelStreamingSettings } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; import { AggregatedStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; import { DataChannelLatencyTest } from './DataChannelLatencyTest'; import { StatsPanelConfiguration } from './UIConfigurationTypes'; /** * A stat structure, an id, the stat string, and the element where it is rendered. */ export declare class Stat { id: string; title: string; stat: string; element: HTMLElement; } /** * A UI component containing all the stats for the application. */ export declare class StatsPanel { _rootElement: HTMLElement; _statsCloseButton: HTMLElement; _statsContentElement: HTMLElement; _statisticsContainer: HTMLElement; _latencyStatsContainer: HTMLElement; _statsResult: HTMLElement; _latencyResult: HTMLElement; _config: StatsPanelConfiguration; latencyTest: LatencyTest; dataChannelLatencyTest: DataChannelLatencyTest; statsMap: Map; constructor(config: StatsPanelConfiguration); /** * @returns Return or creates a HTML element that represents this setting in the DOM. */ get rootElement(): HTMLElement; get statsContentElement(): HTMLElement; get statisticsContainer(): HTMLElement; get latencyStatsContainer(): HTMLElement; get statsResult(): HTMLElement; get latencyResult(): HTMLElement; get statsCloseButton(): HTMLElement; onDisconnect(): void; onVideoInitialized(stream: PixelStreaming): void; configure(settings: PixelStreamingSettings): void; /** * Show stats panel. */ show(): void; /** * Toggle the visibility of the stats panel. */ toggleVisibility(): void; /** * Hide the stats panel. */ hide(): void; handlePlayerCount(playerCount: number): void; /** * Handle stats coming in from browser/UE * @param stats - the stats structure */ handleStats(stats: AggregatedStats): void; handleLatencyInfo(latencyInfo: LatencyInfo): void; /** * Adds a new stat to the stats results in the DOM or updates an exiting stat. * @param id - The id of the stat to add/update. * @param stat - The contents of the stat. */ addOrUpdateSessionStat(id: string, statLabel: string, stat: string): void; /** * Adds a new stat to the latency results in the DOM or updates an exiting stat. * @param id - The id of the stat to add/update. * @param stat - The contents of the stat. */ addOrUpdateLatencyStat(id: string, statLabel: string, stat: string): void; /** * Adds a new stat to the stats results in the DOM or updates an exiting stat. * @param sectionId - The section to add this stat too. * @param id - The id of the stat to add/update. * @param stat - The contents of the stat. */ private addOrUpdateStat; }