UNPKG

@skyway-sdk/sfu-bot

Version:

The official Next Generation JavaScript SDK for SkyWay

66 lines 2.89 kB
import { Event } from '@skyway-sdk/common'; import { type LocalAudioStream, type LocalCustomVideoStream, type LocalPersonImpl, type LocalVideoStream, MemberImpl, type MemberType, type Publication, type RemoteMemberImplInterface, type SkyWayChannelImpl, type SkyWayContext } from '@skyway-sdk/core'; import type { SFURestApiClient } from '@skyway-sdk/sfu-api-client'; import type { SFUBotPlugin } from '.'; import { SFUConnection } from './connection'; import type { TransportRepository } from './connection/transport/transportRepository'; import type { Forwarding, ForwardingConfigure } from './forwarding'; import type { SFUBotPluginOptions } from './option'; export declare class SFUBotMember extends MemberImpl implements RemoteMemberImplInterface { readonly side = "remote"; static readonly subtype = "sfu"; readonly subtype = "sfu"; readonly type: MemberType; private readonly _context; private readonly _transportRepository; readonly options: SFUBotPluginOptions; private _connections; /** @description [japanese] forwardingを開始した時に発火するイベント */ readonly onForwardingStarted: Event<{ forwarding: Forwarding; }>; /** @description [japanese] forwardingを終了した時に発火するイベント */ readonly onForwardingStopped: Event<{ forwarding: Forwarding; }>; /** @description [japanese] forwardingの数が変化した時に発火するイベント */ readonly onForwardingListChanged: Event<void>; private readonly _api; private _startForwardQueue; private _forwardings; get forwardings(): Forwarding[]; /**@internal */ constructor(args: { channel: SkyWayChannelImpl; id: string; name?: string; metadata?: string | undefined; plugin: SFUBotPlugin; api: SFURestApiClient; context: SkyWayContext; transportRepository: TransportRepository; options: SFUBotPluginOptions; }); /**@private */ _getConnection(localPersonId: string): SFUConnection; /**@private */ _getOrCreateConnection(localPerson: LocalPersonImpl): SFUConnection; /**@private */ private _createConnection; /** * @description [japanese] StreamのPublicationをForwardingする * @throws {SkyWayError} * @example * const forwarding = await bot.startForwarding(publication, { maxSubscribers: 99 }); */ startForwarding(publication: Publication<LocalVideoStream | LocalAudioStream | LocalCustomVideoStream>, configure?: Partial<ForwardingConfigure>): Promise<Forwarding>; private _startForwarding; private listenStopForwardEvent; /** * @description [japanese] Forwardingを停止する */ stopForwarding: (target: string | Forwarding) => Promise<void>; /**@private */ _dispose(): void; } //# sourceMappingURL=member.d.ts.map