UNPKG

fcr-core

Version:

Core APIs for building online scenes

111 lines (110 loc) 3.49 kB
import { FcrCoreEngineConfig } from '..'; import { FcrDesktopMediaControl, FcrMobileMediaControl } from '../media-control/type'; import { FcrMonitorControl } from '../monitor-control/type'; import { FcrInfinityRoomControl, FcrMainRoomControl, FcrRoomJoinOptions, FcrWaitingRoomControl } from '../room-control/type'; import { FcrRoomRouter } from '../room-router/type'; import { FcrCoreEngine, FcrCoreEngineObserver, FcrPeerSessionControl, FcrRemoteControl } from '../type'; import { Unknown } from '../imports'; export declare class FcrCoreEngineImpl implements FcrCoreEngine { constructor(config: FcrCoreEngineConfig); /** * Releases the engine and all its resources. */ release(): number; /** * Logins to the RTE service. */ login(): Promise<void>; /** * Logouts from the RTE service. */ logout(): Promise<void>; /** * Renews the user token. * @param token */ renewUserToken(token: string): Promise<number>; /** * Gets the version of the SDK. * @returns The version of the SDK. */ getVersion(): string; getDependencyVersions(): Record<string, string>; createMainRoomControl(roomId: string): FcrMainRoomControl; /** * Creates a room control. * @param roomId * @returns The room control. */ createInfinityRoomControl(roomId: string): FcrInfinityRoomControl; /** * Creates a waiting room control. * @param roomId * @returns The room control. */ createWaitingRoomControl(roomId: string): FcrWaitingRoomControl; /** * Creates room router. * @param roomId * @returns The room router. */ createRoomRouter(roomId: string): FcrRoomRouter; /** * Creates a main room control or a waiting room control. * @param roomId * @returns The room control. */ createRoomControlAndJoin(roomId: string, options: FcrRoomJoinOptions): Promise<FcrMainRoomControl | FcrWaitingRoomControl | FcrInfinityRoomControl>; /** * Gets the media control. * @returns The media control. */ getDesktopMediaControl(): FcrDesktopMediaControl; /** * Gets the mobile media control. * @returns The mobile media control. */ getMobileMediaControl(): FcrMobileMediaControl; /** * Gets the monitor control. * @returns The monitor control. */ getMonitorControl(): FcrMonitorControl; /** * Gets the peer session control. * @returns The peer session control. */ getPeerSessionControl(): FcrPeerSessionControl; /** * Gets the remote control. * @returns The remote control. */ getRemoteControl(): FcrRemoteControl; /** * Sends a peer message. * @param payload * @param guaranteedDelivery * @param receiverId */ sendPeerMessage(payload: Record<string, Unknown>, guaranteedDelivery: boolean, receiverId: string): Promise<number>; /** * Sets the parameters. * @param parameters */ setParameters(parameters: Record<string, Unknown>): number; /** * Adds an observer. * @param observer */ addObserver(observer: FcrCoreEngineObserver): void; /** * Removes an observer. * @param observer */ removeObserver(observer: FcrCoreEngineObserver): void; private _addRteEngineObserver; private _addLogObserver; private _setupCoreIpList; private _setupChatConnection; private _createChatConnection; }