@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
53 lines (52 loc) • 1.52 kB
TypeScript
import { HMSPeer as IHMSPeer } from '../../../interfaces/peer';
import { HMSPeerType } from '../../../interfaces/peer/hms-peer';
import { HMSRole } from '../../../interfaces/role';
import { HMSAudioTrack, HMSTrack, HMSVideoTrack } from '../../../media/tracks';
export declare type HMSPeerInit = {
peerId: string;
name: string;
isLocal: boolean;
customerUserId?: string;
metadata?: string;
role?: HMSRole;
joinedAt?: Date;
fromRoomState?: boolean;
metworkQuality?: number;
groups?: string[];
realtime?: boolean;
isHandRaised?: boolean;
type: HMSPeerType;
};
export declare class HMSPeer implements IHMSPeer {
readonly peerId: string;
readonly isLocal: boolean;
name: string;
customerUserId?: string;
metadata?: string;
audioTrack?: HMSAudioTrack;
videoTrack?: HMSVideoTrack;
auxiliaryTracks: HMSTrack[];
role?: HMSRole;
joinedAt?: Date;
networkQuality?: number;
groups?: string[];
realtime?: boolean;
type: HMSPeerType;
constructor({ peerId, name, isLocal, customerUserId, metadata, role, joinedAt, groups, realtime, type, }: HMSPeerInit);
get isHandRaised(): boolean;
/**
* @internal
*/
updateRole(newRole: HMSRole): void;
/**
* @internal
*/
updateName(newName: string): void;
updateNetworkQuality(quality: number): void;
/**
* @internal
*/
updateMetadata(data: string): void;
updateGroups(groups: string[]): void;
toString(): string;
}