@telnyx/webrtc
Version:
Telnyx WebRTC Client
46 lines (45 loc) • 3 kB
TypeScript
import { IVertoCallOptions, IWebRTCSupportedBrowser, IWebRTCInfo, IAudio } from './interfaces';
declare const getUserMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream | null>;
declare const getDevices: (kind?: MediaDeviceKind | undefined, fullList?: boolean) => Promise<MediaDeviceInfo[]>;
declare const scanResolutions: (deviceId: string) => Promise<any[]>;
declare const getMediaConstraints: (options: IVertoCallOptions) => Promise<MediaStreamConstraints>;
declare const assureDeviceId: (id: string, label: string, kind: MediaDeviceInfo['kind']) => Promise<string>;
declare const removeUnsupportedConstraints: (constraints: MediaTrackConstraints) => void;
declare const checkDeviceIdConstraints: (id: string, label: string, kind: MediaDeviceInfo['kind'], constraints: MediaTrackConstraints) => Promise<MediaTrackConstraints>;
declare const sdpStereoHack: (sdp: string) => string;
declare const sdpMediaOrderHack: (answer: string, localOffer: string) => string;
declare const checkSubscribeResponse: (response: any, channel: string) => boolean;
declare type DestructuredResult = {
subscribed: string[];
alreadySubscribed: string[];
unauthorized: string[];
unsubscribed: string[];
notSubscribed: string[];
};
declare const destructSubscribeResponse: (response: any) => DestructuredResult;
declare const enableAudioTracks: (stream: MediaStream) => void;
declare const disableAudioTracks: (stream: MediaStream) => void;
declare const toggleAudioTracks: (stream: MediaStream) => void;
declare const enableVideoTracks: (stream: MediaStream) => void;
declare const disableVideoTracks: (stream: MediaStream) => void;
declare const toggleVideoTracks: (stream: MediaStream) => void;
declare const sdpBitrateHack: (sdp: string, max: number, min: number, start: number) => string;
declare const sdpBitrateASHack: (sdp: string, bandwidthKbps: number) => string;
declare function getBrowserInfo(): {
browserInfo: string;
name: string;
version: number;
supportAudio: boolean;
supportVideo: boolean;
};
declare function getWebRTCInfo(): IWebRTCInfo;
export declare enum SUPPORTED_WEBRTC {
not_supported = "not supported",
full = "full",
partial = "partial"
}
declare function getWebRTCSupportedBrowserList(): Array<IWebRTCSupportedBrowser>;
declare function createAudio(file: any, id: any): IAudio | null;
declare function playAudio(audioElement: IAudio): void;
declare function stopAudio(audioElement: IAudio): void;
export { getUserMedia, getDevices, scanResolutions, getMediaConstraints, assureDeviceId, removeUnsupportedConstraints, checkDeviceIdConstraints, sdpStereoHack, sdpMediaOrderHack, sdpBitrateHack, sdpBitrateASHack, checkSubscribeResponse, destructSubscribeResponse, enableAudioTracks, disableAudioTracks, toggleAudioTracks, enableVideoTracks, disableVideoTracks, toggleVideoTracks, getBrowserInfo, getWebRTCInfo, getWebRTCSupportedBrowserList, createAudio, playAudio, stopAudio, };