UNPKG

@signalwire/js

Version:
38 lines 1.16 kB
import { UserOptions } from '@signalwire/core'; import { MakeRoomOptions } from './Client'; import { BaseRoomSession } from './BaseRoomSession'; /** * @internal * @deprecated Use {@link RoomSession} instead. **/ export interface Room extends BaseRoomSession<Room> { } export interface CreateRoomObjectOptions extends UserOptions, Omit<MakeRoomOptions, 'rootElement'> { /** Id of the HTML element in which to display the video stream */ rootElementId?: string; /** Whether to automatically join the room session. */ autoJoin?: boolean; } /** * Using Video.createRoomObject() you can create a `RoomObject` to join a room. * * @example * With an HTMLDivElement with id="root" in the DOM. * ```js * // <div id="root"></div> * * try { * const roomObj = await Video.createRoomObject({ * token: '<YourJWT>', * rootElementId: 'root', * }) * * roomObj.join() * } catch (error) { * console.error('Error', error) * } * ``` * @deprecated Use {@link RoomSession} instead. */ export declare const createRoomObject: (roomOptions: CreateRoomObjectOptions) => Promise<Room>; //# sourceMappingURL=createRoomObject.d.ts.map