@rongcloud/plugin-wechat-rtc
Version:
@rongcloud/plugin-wechat-rtc
33 lines • 1.42 kB
TypeScript
import { IPublishedResource } from '../interfaces';
import { BaseCommand, CommandPriority } from './BaseCommand';
import { CommandExecuteContext } from './CommandExecuteContext';
import { RCCommandKind } from '../enums/RCCommandKind';
import { RCRTCCode } from '../enums/RCRTCCode';
export default class RemoteResourceCommand extends BaseCommand {
private readonly _content;
private readonly _messageType;
protected readonly _userId: string;
constructor(_content: {
/**
* 旧版本兼容参数,当收到非 `RTCMessageName.TOTAL_CONTENT_RESOURCE` 时:
* * ignore 值为 `true` 表示该消息由 signal server 向旧版本 RTCLib 提供的兼容消息,无需处理
* * 否则认为该消息是由旧版本 RTCLib 主动发出的增量变更消息,需要处理
*/
ignore?: boolean;
/**
* 发布到房间内的资源列表,`RTCMessageName.TOTAL_CONTENT_RESOURCE` 消息携带全量数据,否则为增量数据
*/
uris: IPublishedResource[];
}, _messageType: string, _userId: string);
get kind(): RCCommandKind;
get priority(): CommandPriority;
/**
* 解析同房间远端人员资源变动通知
* @returns
*/
private _parseRemoteResource;
execute(ctx: CommandExecuteContext): Promise<{
code: RCRTCCode;
}>;
}
//# sourceMappingURL=RemoteResourceCommand.d.ts.map