UNPKG

@4players/odin

Version:

A cross-platform SDK enabling developers to integrate real-time VoIP chat technology into their projects

31 lines (30 loc) 1.22 kB
import { Backend } from '@4players/odin-common'; import VideoCapture = Backend.VideoCapture; /** * Represents a video input media for use in applications that involve video * communication or playback. The VideoInput class encapsulates a video capture * source and provides access to its related MediaStream and custom type. */ export declare class VideoInput { readonly capture: VideoCapture; readonly kind = "video-input"; constructor(capture: VideoCapture); get volume(): Backend.CaptureVolume; /** * The MediaStream of the VideoInput that is sent to remote peers for video * playback. * * @return {MediaStream} The MediaStream object if playback has been started. * @throws {Error} Throws an error if the MediaStream is not available. */ get mediaStream(): MediaStream; /** * The custom type helps to identify the purpose of the VideoInput. * When adding the VideoInput to a room, the customType can be used by * remote peers to understand the purpose of the stream. * * @return {string | undefined} The custom type value if available; otherwise, undefined. */ get customType(): string | undefined; close(): void; }