@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
33 lines (32 loc) • 1.55 kB
TypeScript
import { HMSMediaStream } from './HMSMediaStream';
import HMSSubscribeConnection from '../../connection/subscribe/subscribeConnection';
import { HMSSimulcastLayer } from '../../interfaces';
/** @internal */
export declare class HMSRemoteStream extends HMSMediaStream {
private readonly connection;
private audio;
private video;
constructor(nativeStream: MediaStream, connection: HMSSubscribeConnection);
setAudio(enabled: boolean, trackId: string, identifier?: string): Promise<void>;
/**
* Sets the video layer after receiving new state from SFU. This is used when server side subscribe
* degradation is ON.
* @param layer is simulcast layer to be set
* @param identifier is stream identifier to be printed in logs
*/
setVideoLayerLocally(layer: HMSSimulcastLayer, identifier: string, source: string): void;
/**
* Sets the video layer and updates the track state to SFU via api datachannel. This is used when client
* side subscribe degradation is ON or client unsubscribes the current track.
* @param layer is simulcast layer to be set
* @param identifier is stream identifier to be printed in logs
*/
setVideoLayer(layer: HMSSimulcastLayer, trackId: string, identifier: string, source: string): Promise<import("../../connection/channel-messages").PreferLayerResponse>;
/**
* @deprecated
* @returns {HMSSimulcastLayer}
*/
getSimulcastLayer(): HMSSimulcastLayer;
getVideoLayer(): HMSSimulcastLayer;
isAudioSubscribed(): boolean;
}