@telnyx/webrtc
Version:
Telnyx WebRTC Client
56 lines (55 loc) • 1.52 kB
TypeScript
import { Quality } from './utils/mos';
export interface TelnyxIDs {
telnyxCallControlId?: string;
telnyxSessionId?: string;
telnyxLegId?: string;
}
export interface RTCIceCandidateStats {
address: RTCIceCandidate['address'];
candidateType: RTCIceCandidate['type'];
deleted: boolean;
id: string;
port: RTCIceCandidate['port'];
priority: RTCIceCandidate['priority'];
protocol: RTCIceCandidate['protocol'];
relayProtocol?: 'tcp' | 'udp' | 'tls';
timestamp: DOMHighResTimeStamp;
transportId: string;
type: string;
url: string;
}
export interface MinMaxAverage {
min: number;
max: number;
average: number;
}
export interface Report {
iceCandidateStats: RTCIceCandidateStats[];
iceCandidatePairStats: RTCIceCandidatePairStats;
summaryStats: {
jitter: MinMaxAverage;
rtt: MinMaxAverage;
mos: number;
quality: Quality;
};
sessionStats: {
packetsReceived: number;
packetsLost: number;
packetsSent: number;
bytesSent: number;
bytesReceived: number;
};
}
export interface PreCallDiagnosisOptions {
texMLApplicationNumber: string;
credentials: {
login?: string;
password?: string;
loginToken?: string;
};
}
export declare class PreCallDiagnosis {
static run(options: PreCallDiagnosisOptions): Promise<Report>;
private static mapReport;
getTelnyxIds(): TelnyxIDs;
}