UNPKG

@100mslive/hms-video-store

Version:

@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow

35 lines (34 loc) 1.26 kB
import { HMSTrack } from './HMSTrack'; import { HMSTrackType } from './HMSTrackType'; import { VideoElementManager } from './VideoElementManager'; import { HMSMediaStream } from '../streams'; export declare class HMSVideoTrack extends HMSTrack { readonly type: HMSTrackType; private sinkCount; videoHandler: VideoElementManager; constructor(stream: HMSMediaStream, track: MediaStreamTrack, source?: string); setVideoHandler(videoHandler: VideoElementManager): void; /** * sink=video element rendering the video */ hasSinks(): boolean; getSinks(): HTMLVideoElement[]; attach(videoElement: HTMLVideoElement): void; detach(videoElement: HTMLVideoElement): void; /** * attaches the track to the passed in video element * @param videoElement */ addSink(videoElement: HTMLVideoElement): void; /** * removes the track from the passed in video element * @param videoElement */ removeSink(videoElement: HTMLVideoElement): void; cleanup(): void; protected addSinkInternal(videoElement: HTMLVideoElement, track: MediaStreamTrack): void; handleTrackUnmute: () => void; private reTriggerPlay; private reduceSinkCount; private addPropertiesToElement; }