sinch-rtc
Version:
RTC JavaScript/Web SDK
78 lines (77 loc) • 3.51 kB
TypeScript
import { RtcProfile, RtcConfig } from "../ocra/api/models";
import { Event } from "../utils/Event";
import { OutboundCall } from "./OutboundCall";
import { CallInitiator } from "./CallInitiator";
import { CallClientEventFanout } from "./listeners/CallClientEventFanout";
import { CallReporter } from "./reporting/CallReporter";
import { WebRTCStatsCollector } from "./reporting/WebRTCStatsCollector";
import { CallClientListener } from "./listeners/CallClientListener";
import { NotificationResult } from "../push/NotificationResult";
import { Call } from "./Call";
import { PushService } from "../push/PushService";
import { FetchIceServers } from "../rtc";
import { Features } from "../features/Features";
import { MediaManager } from "../rtc/MediaManager";
export declare class CallClientInstance {
userId: string;
applicationKey: string;
rtcConfig: RtcConfig;
private fetchIceServers;
private callInitiator;
private rtcProfile;
private incomingCallEvent;
private pushSender;
private callReporter;
private webRtcStatsCollector;
private mediaManager;
private useRelayIceCandidatesOnly;
private features;
private instanceId;
private callerIdentifier?;
onOutboundCall?: Event<Call>;
private readonly mxpChannels;
private readonly mxpProtocol;
private readonly localPeer;
private readonly calls;
private pubSubClient;
private stunUrls?;
private getRTCIceServers;
private joinIceServersAndStunUrls;
private mxpEventsCollector;
private isMxpEventLogsEnabled?;
private isTurnEnabled?;
constructor(userId: string, applicationKey: string, rtcConfig: RtcConfig, fetchIceServers: FetchIceServers, callInitiator: CallInitiator, rtcProfile: RtcProfile, incomingCallEvent: CallClientEventFanout, pushSender: PushService, callReporter: CallReporter, webRtcStatsCollector: WebRTCStatsCollector, mediaManager: MediaManager, useRelayIceCandidatesOnly: boolean, features: Features, instanceId: string, callerIdentifier?: string | undefined);
addListener: (listener: CallClientListener) => void;
removeEventListener(listener: CallClientListener): void;
private newOutboundCall;
private ensureCallNotExists;
hasActiveCall(): boolean;
private hasVideo;
private createMxpEventsCollector;
private newInboundCall;
private addCallListener;
private storeCall;
private newCallId;
private getMxpChannel;
private getOrCreateMxpChannel;
private createMxpChannel;
private onBroadcastMessage;
private onSignalMessage;
private startSubscription;
private static isMxpCall;
private call;
private sendOutboundMessage;
private cancelSubscription;
private onInvite;
private createPubSubClient;
handleCallPushPayload(notificationResult: NotificationResult): void;
callUser(userId: string, video: boolean, headers?: Record<string, string>): Promise<OutboundCall>;
callSip(destination: string, video: boolean, headers?: Record<string, string>): Promise<OutboundCall>;
callConference(id: string, video: boolean, headers?: Record<string, string>): Promise<OutboundCall>;
callPhoneNumber(number: string, headers?: Record<string, string>): Promise<OutboundCall>;
getCall(id: string): Call | undefined;
set audioConstraints(constraints: MediaTrackConstraints | null);
set videoConstraints(constraints: MediaTrackConstraints | null);
private updateActiveCallTrackConstraints;
private onAcceptedWithoutTracks;
}