UNPKG

@tencentcloud/roomkit-web-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

107 lines (105 loc) 3.16 kB
import { ExtensionInfo } from '../../../node_modules/@tencentcloud/tui-core'; import { RoomService } from '../services'; import { Message, Profile } from '../../../node_modules/@tencentcloud/chat'; export interface MessageData { ID?: string; isInnerRoom: boolean; isRoomMessage: boolean; isRoomCreateByMe: boolean; isMessageFromMe: boolean; roomId: string; roomState: RoomState; userList: Array<{ faceUrl: string; nickName: string; userId: string; }>; myProfile: Profile; ownerName: string; owner: string; } export interface CustomMessagePayload { version: number; businessID: string; groupId: string; messageId: string; roomId: string; owner: string; ownerName: string; roomState: RoomState; memberCount: 1; userList: Array<{ faceUrl: string; nickName: string; userId: string; }>; } export declare enum RoomState { CREATING = "creating", CREATED = "created", DESTROYING = "destroying", DESTROYED = "destroyed" } export declare enum ChatType { C2C = "C2C", GROUP = "GROUP", CUSTOM_SERVICE = "customerService", ROOM = "room" } export declare class ChatExtension { static instance?: ChatExtension; private message; private messagePayload; chatContext: { chat: Record<string, any>; SDKAppID: number; userID: string; userSig: string; }; myProfile: Profile; private customMessages; private isInit; private chatExtensionSetting; private service?; private language; constructor(); setActiveMeetingMessage(message: Message, messagePayload: CustomMessagePayload): void; static getInstance(): ChatExtension; static destroyInstance(): void; _bind(service: RoomService): void; init(): void; reset(): void; setHistoryMeetingMessageList(type: 'add' | 'delete', customMessage: { ID: string; messageData: MessageData; }): void; setChatExtension(chatType: ChatType, isShow: boolean): void; private initEventCtx; private bindRoomServiceEvent; private bindRoomEngineEvent; private unBindRoomServiceEvent; private unBindRoomEngineEvent; private onRemoteUserEnterRoom; private onRemoteUserLeaveRoom; private onUserInfoChanged; private onRoomDestroy; onGetExtension(extensionID: string, params: any): never[] | ExtensionInfo; private mixinInit; private setAnotherMessageRoomState; private quickRoom; private destroyRoom; onNotifyEvent(eventName: string, subKey: string, params?: Record<string, any>): Promise<void>; private roomInit; enterRoom(roomId: string, message: Message): Promise<void>; private createCustomMessage; private sendMessage; private updateMessageList; private modifyMessage; private generatePayloadForMessage; parseMessageData(message: Message): CustomMessagePayload; getMyProfile(): Promise<any>; private getUserProfile; private getIsMeetingInProgress; getOnGoingRoomId(): string | undefined; } export declare const chatExtension: ChatExtension;