@rongcloud/plugin-wechat-rtc
Version:
@rongcloud/plugin-wechat-rtc
33 lines • 1.17 kB
TypeScript
import { BaseCommand, CommandPriority, ICommandResult } from './BaseCommand';
import { CommandExecuteContext } from './CommandExecuteContext';
import { RCCommandKind } from '../enums/RCCommandKind';
export default class RemoteUserCommand extends BaseCommand {
private readonly _msgContent;
protected _userId: string;
constructor(_msgContent: {
users: {
userId: string;
/**
* 状态值,其中
* * `0`: 进入房间
* * `1`: 退出房间
* * `2`: 用户离线,当作离开房间处理
*/
state: '0' | '1' | '2';
/**
* 角色切换类型,0 代表非切换身份发生的加入、退出房间行为
*/
switchRoleType: 0;
/**
* 加房间的身份标识,保存主房间 roomId
*/
extra?: {
[key: string]: string;
};
}[];
});
get kind(): RCCommandKind;
get priority(): CommandPriority;
execute(ctx: CommandExecuteContext): Promise<ICommandResult>;
}
//# sourceMappingURL=RemoteUserCommand.d.ts.map