UNPKG

@pureweb/platform-streaming-agent

Version:

The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform

33 lines (32 loc) 1.28 kB
import { AbstractExtension } from '../../IExtension'; import { IConnectionService } from '../../IConnectionService'; import { ConnectionStates } from '../../ConnectionStates'; import { IPresenceMonitor } from './IPresenceMonitor'; export declare class PresenceMonitorExtension extends AbstractExtension implements IConnectionService, IPresenceMonitor { private _disconnectedParticipants; private _participants; private _claimingAgent; private participantJoined; private claimed; private connectionStateChange; private presenceCheckInterval; private checkingParticipants; private _bOfferSent; monitor(agentId: string, bOffer?: boolean): Promise<void>; /** * Removes participant and saves it as a disconnected participant * so if the agent reconnects it will not require to send the offer * in order to keep the SA going. * @param agentId agent id */ private removeParticipant; start: () => Promise<boolean>; get participants(): number; stop: () => Promise<boolean>; onStateChanged(handler: (state: ConnectionStates) => void): void; private monitorPresence; /** * Checks if we need to terminate if there are no active streaming agents */ private checkForTermination; }