@telnyx/webrtc
Version:
Telnyx WebRTC Client
64 lines (63 loc) • 1.78 kB
TypeScript
import Call from 'src/Modules/Verto/webrtc/Call';
import { INotificationEventData } from '../Modules/Verto/util/interfaces';
export interface ICredentials {
username?: string;
password?: string;
token?: string;
}
export interface IClientOptions {
login_token?: string;
login?: string;
password?: string;
ringtoneFile?: string;
ringbackFile?: string;
debug?: boolean;
debugOutput?: 'socket' | 'file';
prefetchIceCandidates?: boolean;
forceRelayCandidate?: boolean;
region?: string;
anonymous_login?: {
target_type: string;
target_id: string;
};
}
export interface ICallOptions {
destinationNumber?: string;
callerNumber?: string;
callerName?: string;
id?: string;
telnyxCallControlId?: string;
telnyxSessionId?: string;
telnyxLegId?: string;
clientState?: string;
localStream?: MediaStream;
remoteStream?: MediaStream;
localElement?: HTMLMediaElement | string;
remoteElement?: HTMLMediaElement | string;
iceServers?: RTCIceServer[];
audio?: boolean;
video?: boolean;
useStereo?: boolean;
micId?: string;
camId?: string;
speakerId?: string;
onNotification?: Function;
mediaSettings?: {
useSdpASBandwidthKbps?: boolean;
sdpASBandwidthKbps?: number;
};
customHeaders?: {
name: string;
value: string;
}[];
debug?: boolean;
debugOutput?: 'socket' | 'file';
preferred_codecs?: RTCRtpCodecCapability[];
prefetchIceCandidates?: boolean;
forceRelayCandidate?: boolean;
}
export interface INotification extends Omit<INotificationEventData, 'call'> {
type: string;
call?: Call;
error?: Error;
}