100 lines
4.0 KiB
TypeScript
100 lines
4.0 KiB
TypeScript
import { ITUICallService, ICallParams, IGroupCallParams, ICallbackParam, ISelfInfoParams, IInviteUserParams, IJoinInGroupCallParams, IInitParams } from '../interface/ICallService';
|
|
import { LanguageType, LOG_LEVEL, VideoDisplayMode, VideoResolution } from '../const/index';
|
|
import { ITUIGlobal } from '../interface/ITUIGlobal';
|
|
import { ITUIStore } from '../interface/ITUIStore';
|
|
declare const TUIGlobal: ITUIGlobal;
|
|
declare const TUIStore: ITUIStore;
|
|
export { TUIGlobal, TUIStore };
|
|
export default class TUICallService implements ITUICallService {
|
|
static instance: TUICallService;
|
|
_tuiCallEngine: any;
|
|
private _tim;
|
|
private _TUICore;
|
|
private _timerId;
|
|
private _startTimeStamp;
|
|
private _bellContext;
|
|
private _defaultOfflinePushInfo;
|
|
constructor();
|
|
static getInstance(): TUICallService;
|
|
init(params: IInitParams): Promise<void>;
|
|
destroyed(): Promise<void>;
|
|
call(callParams: ICallParams): Promise<void>;
|
|
groupCall(groupCallParams: IGroupCallParams): Promise<void>;
|
|
inviteUser(params: IInviteUserParams): Promise<void>;
|
|
joinInGroupCall(params: IJoinInGroupCallParams): Promise<void>;
|
|
getTUICallEngineInstance(): any;
|
|
setLogLevel(level: LOG_LEVEL): void;
|
|
setLanguage(language: LanguageType): void;
|
|
enableFloatWindow(enable: boolean): void;
|
|
setSelfInfo(params: ISelfInfoParams): Promise<void>;
|
|
setCallingBell(filePath?: string): Promise<void>;
|
|
enableMuteMode(enable: boolean): Promise<void>;
|
|
accept(): Promise<void>;
|
|
hangup(): Promise<void>;
|
|
reject(): Promise<void>;
|
|
openCamera(videoViewDomID: string): Promise<void>;
|
|
closeCamera(): Promise<void>;
|
|
openMicrophone(): Promise<void>;
|
|
closeMicrophone(): Promise<void>;
|
|
switchScreen(userId: string): void;
|
|
switchCallMediaType(): Promise<void>;
|
|
switchCamera(): Promise<void>;
|
|
setSoundMode(type?: string): void;
|
|
getTim(): any;
|
|
private _addListenTuiCallEngineEvent;
|
|
private _removeListenTuiCallEngineEvent;
|
|
private _handleError;
|
|
private _handleNewInvitationReceived;
|
|
private _handleUserAccept;
|
|
private _handleUserEnter;
|
|
private _callerChangeToConnected;
|
|
private _handleUserLeave;
|
|
private _unNormalEventsManager;
|
|
private _handleInviteeReject;
|
|
private _handleNoResponse;
|
|
private _handleLineBusy;
|
|
private _handleCallingCancel;
|
|
private _handleCallingEnd;
|
|
private _handleSDKReady;
|
|
private _handleKickedOut;
|
|
private _handleCallTypeChange;
|
|
private _messageSentByMe;
|
|
private _handleUserUpdate;
|
|
private _handleCallError;
|
|
beforeCalling: ((...args: any[]) => void) | undefined;
|
|
afterCalling: ((...args: any[]) => void) | undefined;
|
|
onMinimized: ((...args: any[]) => void) | undefined;
|
|
onMessageSentByMe: ((...args: any[]) => void) | undefined;
|
|
kickedOut: ((...args: any[]) => void) | undefined;
|
|
statusChanged: ((...args: any[]) => void) | undefined;
|
|
setCallback(params: ICallbackParam): void;
|
|
toggleMinimize(): void;
|
|
private _executeExternalBeforeCalling;
|
|
private _executeExternalAfterCalling;
|
|
setVideoDisplayMode(displayMode: VideoDisplayMode): void;
|
|
setVideoResolution(resolution: VideoResolution): Promise<void>;
|
|
private _handleExceptionExit;
|
|
private _setLocalUserInfoAudioVideoAvailable;
|
|
private _updateCallStoreBeforeCall;
|
|
private _updateCallStoreAfterCall;
|
|
private _resetCurrentDevice;
|
|
private _resetCallStore;
|
|
private _noDevicePermissionToast;
|
|
private _startTimer;
|
|
private _updateCallDuration;
|
|
private _stopTimer;
|
|
private _deleteRemoteUser;
|
|
private _analyzeEventData;
|
|
getGroupMemberList(count: number, offset: number): Promise<any>;
|
|
getGroupProfile(): Promise<any>;
|
|
private _handleCallStatusChange;
|
|
private _watchTUIStore;
|
|
private _unwatchTUIStore;
|
|
bindTUICore(TUICore: any): void;
|
|
private _callTUIService;
|
|
onNotifyEvent(eventName: string, subKey: string): Promise<void>;
|
|
onCall(method: String, params: any): Promise<void>;
|
|
private _handleTUICoreOnClick;
|
|
onGetExtension(extensionID: string, params: any): any[];
|
|
}
|