UNPKG

@signalwire/js

Version:
49 lines 2.19 kB
import { BaseClient, ClientEvents, ClientContract } from '@signalwire/core'; import { ConnectionOptions } from '@signalwire/webrtc'; import { VideoManager } from './cantina'; import type { Client as ChatClient } from './chat/Client'; import type { Client as PubSubClient } from './pubSub/Client'; import type { RoomSession } from './video/RoomSession'; export interface Client<RoomSessionType = RoomSession> extends ClientContract<Client<RoomSessionType>, ClientEvents> { rooms: ClientAPI['rooms']; chat: ClientAPI['chat']; pubSub: ClientAPI['pubSub']; } export interface MakeRoomOptions extends ConnectionOptions { /** HTML element in which to display the video stream */ rootElement?: HTMLElement; /** Whether to apply the local-overlay on top of your video. Default: `true`. */ applyLocalVideoOverlay?: boolean; /** Whether to apply an overlay on top of each member. Default: `true`. */ applyMemberOverlay?: boolean; /** Whether to mirror the local video overlay. Default: `false`. */ mirrorLocalVideoOverlay?: boolean; /** Whether to stop the camera when the member is muted. Default: `true`. */ stopCameraWhileMuted?: boolean; /** Whether to stop the microphone when the member is muted. Default: `true`. */ stopMicrophoneWhileMuted?: boolean; /** Local media stream to override the local video and audio stream tracks */ localStream?: MediaStream; } export declare class ClientAPI extends BaseClient<ClientEvents> { private _videoManager; private _chat; private _pubSub; get rooms(): { makeRoomObject: (makeRoomOptions: MakeRoomOptions) => import("./video/VideoRoomSession").VideoRoomSession; }; get chat(): ChatClient; get pubSub(): PubSubClient; /** @internal */ get videoManager(): VideoManager; /** * Reauthenticate with the SignalWire network using a new token * For now it returns void since with an invalid token the server * will close the connection right away so we can hook on the session * events in case. Need to improve it. * * @internal */ reauthenticate(token: string): void; } //# sourceMappingURL=Client.d.ts.map