import { default as VideoAudioTrack } from '../main/track/videoAudioTrack'; import { default as ContentTrack } from '../main/track/contentTrack'; import { AnalyserConfig, ClientInfoConfig, IConference, IConfMgmtUrl, ICustomMessageConfig, IFeatureConfig, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMakeCall, IMode, InviteInfo, IReqInfo, IReturnResult, IRoster, IVideoAudioType, IVideoControlResult, IVideoProfile, Key, LayoutConfig, LayoutMode, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginVerifyCodeParams, LoginXYAccountParams, MEETING_DIRECTION, TCommand, TLocalLanguage, XYCheckNumberParams, XYClientEventKey, XYServerInfo, XYWebRxAudioStatus } from '../type/index'; import { AudioAnalyser } from '../tools/analyser'; import { XYEnterpriseInfo, XYSensitiveWords, XYUicustomization } from '../main/meeting/index.type'; import { CheckCaptchaImageParams, LoginOtherParams } from '../main/auth/index.type'; import { SnapshotParams, SnapshotResult } from '@xylink/xy-toolkit'; export interface XYClientIF { /** * 初始化 */ on(key: XYClientEventKey | string, listener: Function, total?: number): void; setFeatureConfig(config: IFeatureConfig): Promise; /** * 登录 */ checkCaptchaImage(data: CheckCaptchaImageParams): Promise<{ success: boolean; }>; getCaptchaImage(): Promise; getVerificationCode(phone: string): Promise; loginExternalAccount(params: ILoginExtAccount): Promise; loginExtToken(params: LoginExtTokenParams): Promise; loginWithAuthCode(params: ILoginWidthAuthCode): Promise; loginXYAccount(params: LoginXYAccountParams): Promise; loginXYlinkAccount(userName: string, password: string, params?: LoginOtherParams): Promise; loginXYLinkByVerifyCode(params: LoginVerifyCodeParams): Promise; logout(): Promise; setLoginTokenInfo(info: LoginTokenInfo): Promise; /** * 呼叫 */ makeCall(params: IMakeCall): Promise; /** * 轨道管理 */ createVideoAudioTrack(): Promise; createContentTrack(): Promise; /** * 媒体管理 */ getAudioStream(rosterId?: string): MediaStream | null; getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | AudioAnalyser | null; getVideoStream(rosterId?: string): MediaStream | null; getSnapshot(params: SnapshotParams): Promise; muteAudio(): Promise; muteVideo(): Promise; unmuteAudio(): Promise; unmuteVideo(): Promise; publish(track: VideoAudioTrack | ContentTrack): void; removeAudioAnalyser(id?: string): void | IReturnResult; setTranslationLanguage(language: TLocalLanguage): Promise; setVideoProfile(direction: MEETING_DIRECTION, profile: IVideoProfile): Promise; setWebRxAudioStatus(params: XYWebRxAudioStatus): void; startTranslation(): Promise; stopTranslation(): Promise; subscribeBulkRoster(): Promise; /** * 拉流/布局 */ forceFullScreen(id?: string): Promise; playAudio(): Promise; playLocalVideo(): Promise; playVideo(idList?: string[]): Promise; requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise; requestAutoPollingLayout(command: TCommand, interval: number | undefined, reqList: IReqInfo[]): Promise; removeAudioRenderer(key: string): Promise; removeVideoRenderer(id: string): Promise; removeSlaveVideoRenderer(rosterId?: string, viewId?: string): Promise; setFocusView(id: string): Promise; setPageInfo(currentPage?: number): Promise; setVideoRenderer(id: string, wrapEleId: string): Promise; setLocalViewParams(params: LocalViewParams): Promise; setSlaveVideoRenderer(id: string, wrapEleId: string): Promise; setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise; switchLayout(templateMode?: IMode): Promise; setLayoutConfig(config: LayoutConfig): void; setLayoutMode(mode: LayoutMode): void; setLayoutOrientation(orientation: LayoutOrientationType): Promise; setHideLocalView(state: boolean): Promise<{ status: boolean; }>; updateLayoutSize(): void; /** * 会议操作/获取信息 */ checkMeetingNumber(params: XYCheckNumberParams): Promise; checkMeetingPassword(params: XYCheckNumberParams): Promise; getMeetingInviteInfo(): Promise; getSelfRoster(): IRoster; toggleHideId(hideId: number | string): Promise; /** * 调度 */ bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true | IReturnResult; getConference(params: IGetConferenceParams): Promise; setPollingAudioStatus(type: 'mute' | 'unmute', callUriList: string | string[]): Promise; startMonitor(uriList?: string[]): void; startMonitorGroup(mediagroupIds: Key[]): IReturnResult; stopMonitor(uriList?: string[]): void; stopMonitorGroup(mediagroupIds: Key[]): IReturnResult; /** * 录制 */ startCloudRecord(): Promise; stopCloudRecord(): Promise; /** * 会控操作 */ endAllMeeting(): Promise; getConfMgmtUrl(): Promise; nextPollingPage(): void; onHandDown(): Promise; onHandUp(): Promise; onMute(): Promise; rename(newName: string): Promise; sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', data: IVideoControlResult): Promise; signIn(questionnaireId: string): Promise; startMeetingFocusView(id: string): Promise; stopMeetingFocusView(id: string): Promise; verifyControlPassword(pwd: string): Promise; /** * 挂断会议 */ destroy(reason?: string, blockSendSocket?: boolean): Promise; hangup(reason?: string, blockSendSocket?: boolean): Promise; off(key: string): void; /** * 其他 */ checkSensitiveWord(displayName: string): Promise; getCloudMeetingRooms(): Promise; getEnterpriseInfo(): Promise; getUicustomization(): Promise; sendCustomMessage(config: ICustomMessageConfig): IReturnResult; setClientInfo(info: ClientInfoConfig): void; setServerAddress(serverInfo: XYServerInfo): void; switchDebug(status: boolean): Promise; switchFeatureConfig(key: IFeatureConfigKey, value: IFeatureConfigValue): Promise; }