@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
29 lines (28 loc) • 1.43 kB
TypeScript
import { TrackManager } from './TrackManager';
import { EventBus } from '../../events/EventBus';
import { HMSPeer, HMSUpdateListener } from '../../interfaces';
import { HMSRemoteTrack } from '../../media/tracks';
import { Store } from '../../sdk/store';
import HMSTransport from '../../transport';
import { TrackState, TrackStateNotification } from '../HMSNotifications';
export declare class OnDemandTrackManager extends TrackManager {
private transport;
TAG: string;
constructor(store: Store, eventBus: EventBus, transport: HMSTransport, listener?: HMSUpdateListener);
handleTrackMetadataAdd(params: TrackStateNotification): void;
handleTrackRemove(track: HMSRemoteTrack): void;
/**
* Add a blank track for the track received from biz so that the UI can render and show video element
* which will trigger the prefer-video-track-state request which results in the actual track being
* received from the sfu.
* This will also be called when track is removed, as it can be removed when none is sent to sfu to
* reduce the overall offer size
* @param {TrackState} trackInfo
* @param {string} peerId
* @param {boolean} callListener
* @returns
*/
processTrackInfo: (trackInfo: TrackState, peerId: string, callListener?: boolean) => void;
addAsPrimaryVideoTrack(hmsPeer: HMSPeer, track: HMSRemoteTrack): boolean;
private isPeerRoleSubscribed;
}