import { IdType } from '../metrics.types'; /** * Rtc Metrics */ export default class RtcMetrics { /** * Array of MetricData items to be sent to the metrics service. */ metricsQueue: any[]; intervalId: number; webex: any; meetingId?: string; callId?: string; correlationId: string; connectionId: string; shouldSendMetricsOnNextStatsReport: boolean; /** * Initialize the interval. * * @param {object} webex - The main `webex` object. * @param {IdType} Ids - Meeting or Calling id. * @param {string} correlationId - The correlation id. */ constructor(webex: any, { meetingId, callId }: IdType, correlationId: any); /** * Updates the call identifier with the provided value. * * @param {string} callId - The new call identifier to set. * @returns {void} */ updateCallId(callId: string): void; /** * Check to see if the metrics queue has any items. * * @returns {void} */ sendMetricsInQueue(): void; /** * Forces sending metrics when we get the next stats-report * * This is useful for cases when something important happens that affects the media connection, * for example when we move from lobby into the meeting. * * @returns {void} */ sendNextMetrics(): void; /** * Add metrics items to the metrics queue. * * @param {object} data - An object with a payload array of metrics items. * * @returns {void} */ addMetrics(data: any): void; /** * Clear the metrics interval. * * @returns {void} */ closeMetrics(): void; /** * Anonymize IP addresses. * * @param {array} stats - An RTCStatsReport organized into an array of strings. * @returns {string} */ anonymizeIp(stats: string): string; /** * Set a new connection id. * * @returns {void} */ private resetConnection; /** * Send metrics to the metrics service. * * @returns {void} */ private sendMetrics; }