@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
50 lines (49 loc) • 1.68 kB
TypeScript
export type VideoPerformanceStatisticsResult = {
effectId: string;
effectParam?: string;
frameWidth: number;
frameHeight: number;
/**
* The duration in milliseconds that the data were collected
*/
duration: number;
/**
* The number of frames that were processed in the duration
*/
sampleCount: number;
/**
* An array that presents counts of frames that were finished in n milliseconds:
* distributionBins[frameProcessingDurationInMs]=frameCount.
* For example, distributionBins[10] = 5 means that 5 frames were processed in 10 milliseconds.
*/
distributionBins: Uint32Array;
};
export declare class VideoPerformanceStatistics {
/**
* Function to report the statistics result
*/
private reportStatisticsResult;
private static readonly initialSessionTimeoutInMs;
private static readonly maxSessionTimeoutInMs;
private currentSession;
private frameProcessingStartedAt;
private distributionBins;
private sampleCount;
private timeoutId;
constructor(distributionBinSize: number,
/**
* Function to report the statistics result
*/
reportStatisticsResult: (result: VideoPerformanceStatisticsResult) => void);
/**
* Call this function before processing every frame
*/
processStarts(effectId: string, frameWidth: number, frameHeight: number, effectParam?: string): void;
processEnds(): void;
private getStatistics;
private start;
private suitableForThisSession;
private reportAndResetSession;
private resetCurrentSession;
private getNextTimeout;
}