import { LocalAudioTrackAnalytics, LocalBaseSample, LocalVideoSample, LocalVideoTrackAnalytics, PublishAnalyticPayload, RemoteAudioSample, RemoteAudioTrackAnalytics, RemoteVideoSample, RemoteVideoTrackAnalytics, SubscribeAnalyticPayload } from './interfaces'; import { EventBus } from '../../events/EventBus'; import { HMSTrackStats } from '../../interfaces'; import { HMSTrack } from '../../internal'; import { HMSWebrtcStats } from '../../rtc-stats'; import { IStore } from '../../sdk/store'; export declare abstract class BaseStatsAnalytics { protected store: IStore; protected eventBus: EventBus; protected readonly sampleWindowSize: number; protected readonly pushInterval: number; private shouldSendEvent; protected sequenceNum: number; constructor(store: IStore, eventBus: EventBus, sampleWindowSize: number, pushInterval: number); start(): void; stop: () => void; private startLoop; protected abstract sendEvent(): void; protected abstract toAnalytics(): PublishAnalyticPayload | SubscribeAnalyticPayload; protected abstract handleStatsUpdate(hmsStats: HMSWebrtcStats): void; } declare type TempPublishStats = HMSTrackStats & { availableOutgoingBitrate?: number; }; export declare abstract class RunningTrackAnalytics { readonly sampleWindowSize: number; track: HMSTrack; track_id: string; source: string; ssrc: string; kind: string; rid?: string; samples: (LocalBaseSample | LocalVideoSample | RemoteAudioSample | RemoteVideoSample)[]; protected tempStats: TempPublishStats[]; constructor({ track, ssrc, rid, kind, sampleWindowSize, }: { track: HMSTrack; ssrc: string; kind: string; rid?: string; sampleWindowSize: number; }); push(stat: TempPublishStats): void; protected abstract toAnalytics: () => LocalAudioTrackAnalytics | LocalVideoTrackAnalytics | RemoteAudioTrackAnalytics | RemoteVideoTrackAnalytics; protected abstract createSample: () => LocalBaseSample | LocalVideoSample | RemoteAudioSample | RemoteVideoSample; protected getLatestStat(): TempPublishStats; protected getFirstStat(): TempPublishStats; protected abstract shouldCreateSample: () => boolean; protected calculateSum(key: keyof TempPublishStats): number | undefined; protected calculateAverage(key: keyof TempPublishStats, round?: boolean): number | undefined; protected calculateDifferenceForSample(key: keyof TempPublishStats): number; protected calculateInstancesOfHigh(key: keyof TempPublishStats, threshold: number): number | undefined; } export declare const hasResolutionChanged: (newStat: TempPublishStats, prevStat: TempPublishStats) => boolean; export declare const hasEnabledStateChanged: (newStat: TempPublishStats, prevStat: TempPublishStats) => boolean; export declare const removeUndefinedFromObject: >(data: T) => T; export {};