@signalwire/js
Version:
38 lines • 1.2 kB
TypeScript
import { UserOptions } from '@signalwire/core';
import type { MakeRoomOptions } from '../Client';
import { VideoRoomSession } from './VideoRoomSession';
/**
* List of properties/methods the user shouldn't be able to
* use until they sucessfully call `roomSession.join()`.
*/
export declare const UNSAFE_PROP_ACCESS: string[];
export interface RoomSessionOptions extends UserOptions, MakeRoomOptions {
}
export interface RoomSession extends VideoRoomSession {
new (opts: RoomSessionOptions): this;
}
/**
* A RoomSession allows you to start and control video sessions.
*
* For example, the following code joins a video session and listens for new
* members joining:
*
* ```typescript
* const roomSession = new SignalWire.Video.RoomSession({
* token: '<YourRoomToken>',
* rootElement: document.getElementById('myVideoElement'),
* audio: true,
* video: true,
* })
*
* roomSession.on('member.joined', (e) => {
* console.log(`${e.member.name} joined`)
* })
*
* roomSession.join({ receiveAudio: true, sendVideo: false })
* ```
*/
export declare const RoomSession: {
new (roomOptions: RoomSessionOptions): RoomSession;
};
//# sourceMappingURL=RoomSession.d.ts.map