UNPKG

@skyway-sdk/sfu-bot

Version:

The official Next Generation JavaScript SDK for SkyWay

46 lines 2.05 kB
import { Event } from '@skyway-sdk/common'; import { type LocalAudioStream, type LocalCustomVideoStream, type LocalPersonImpl, type LocalVideoStream, type Publication, type PublicationImpl, type SkyWayChannelImpl, type SkyWayConnection, type SkyWayContext, type Subscription, type SubscriptionImpl } from '@skyway-sdk/core'; import type { SFURestApiClient } from '@skyway-sdk/sfu-api-client'; import type { SFUBotMember } from '../member'; import { Receiver } from './receiver'; import { Sender } from './sender'; import type { TransportRepository } from './transport/transportRepository'; /**@internal */ export declare class SFUConnection implements SkyWayConnection { private readonly _api; readonly channel: SkyWayChannelImpl; readonly localPerson: LocalPersonImpl; readonly remoteMember: SFUBotMember; private _transportRepository; private _context; readonly type = "sfu"; readonly onDisconnect: Event<void>; readonly onClose: Event<void>; closed: boolean; /**@private */ _receivers: { [subscriptionId: string]: Receiver; }; /**@private */ _senders: { [forwardingId: string]: Sender; }; /**@internal */ constructor(_api: SFURestApiClient, channel: SkyWayChannelImpl, localPerson: LocalPersonImpl, remoteMember: SFUBotMember, _transportRepository: TransportRepository, _context: SkyWayContext); /**@internal */ addSender(publication: PublicationImpl<LocalAudioStream | LocalVideoStream | LocalCustomVideoStream>): Sender; /**@internal */ removeSender(originPublicationId: string): void; startSubscribing(subscription: SubscriptionImpl): Promise<void>; /**@internal */ stopSubscribing(subscription: Subscription): Promise<void>; /**@internal */ stopPublishing(publication: Publication): Promise<void>; /**@internal */ close({ reason }?: { reason?: string; }): void; private _getReceiver; changePreferredEncoding(subscription: SubscriptionImpl): Promise<void>; } //# sourceMappingURL=index.d.ts.map