Go back up


Web SDK API Reference

Enumerations

Classes

Core Interfaces

Other Interfaces

References

IHMSNotifications

Renames and re-exports HMSNotifications

Type Aliases

HMSGroupName

Ƭ HMSGroupName: string


HMSICEServer

Ƭ HMSICEServer: Object

Type declaration

NameType
password?string
urlsstring[]
userName?string

HMSMessageID

Ƭ HMSMessageID: string


HMSNotification

Ƭ HMSNotification: HMSPeerNotification | HMSPeerListNotification | HMSTrackNotification | HMSMessageNotification | HMSExceptionNotification | HMSChangeTrackStateRequestNotification | HMSChangeMultiTrackStateRequestNotification | HMSLeaveRoomRequestNotification | HMSDeviceChangeEventNotification | HMSReconnectionNotification | HMSTranscriptionNotification | HMSPlaylistItemNotification<any>


HMSNotificationCallback

Ƭ HMSNotificationCallback<T>: (notification: HMSNotificationInCallback<T>) => void

Type parameters

NameType
Textends HMSNotificationTypeParam

Type declaration

â–¸ (notification): void

Parameters
NameType
notificationHMSNotificationInCallback<T>
Returns

void


HMSNotificationInCallback

Ƭ HMSNotificationInCallback<T>: T extends HMSNotificationTypes[] ? MappedNotifications<T>[number] : T extends HMSNotificationTypes ? HMSNotificationMapping<T> : HMSNotification

Type parameters

NameType
Textends HMSNotificationTypeParam

HMSNotificationMapping

Ƭ HMSNotificationMapping<T, C>: { CHANGE_MULTI_TRACK_STATE_REQUEST: HMSChangeMultiTrackStateRequestNotification ; CHANGE_TRACK_STATE_REQUEST: HMSChangeTrackStateRequestNotification ; DEVICE_CHANGE_UPDATE: HMSDeviceChangeEventNotification ; ERROR: HMSExceptionNotification ; HAND_RAISE_CHANGED: HMSPeerNotification ; METADATA_UPDATED: HMSPeerNotification ; NAME_UPDATED: HMSPeerNotification ; NEW_MESSAGE: HMSMessageNotification ; PEER_JOINED: HMSPeerNotification ; PEER_LEFT: HMSPeerNotification ; PEER_LIST: HMSPeerListNotification ; PLAYLIST_TRACK_ENDED: HMSPlaylistItemNotification<C> ; POLLS_LIST: HMSPollNotification ; POLL_CREATED: HMSPollNotification ; POLL_STARTED: HMSPollNotification ; POLL_STOPPED: HMSPollNotification ; POLL_VOTES_UPDATED: HMSPollNotification ; RECONNECTED: HMSReconnectionNotification ; RECONNECTING: HMSReconnectionNotification ; REMOVED_FROM_ROOM: HMSLeaveRoomRequestNotification ; ROLE_UPDATED: HMSPeerNotification ; ROOM_ENDED: HMSLeaveRoomRequestNotification ; TRACK_ADDED: HMSTrackNotification ; TRACK_DEGRADED: HMSTrackNotification ; TRACK_DESCRIPTION_CHANGED: HMSTrackNotification ; TRACK_MUTED: HMSTrackNotification ; TRACK_REMOVED: HMSTrackNotification ; TRACK_RESTORED: HMSTrackNotification ; TRACK_UNMUTED: HMSTrackNotification ; TRANSCRIPTION_STATE_UPDATED: HMSTranscriptionNotification }[T]

Type parameters

NameType
Textends HMSNotificationTypes
Cany

HMSNotificationTypeParam

Ƭ HMSNotificationTypeParam: HMSNotificationTypes | HMSNotificationTypes[] | undefined


HMSPeerID

Ƭ HMSPeerID: string


HMSPollState

Ƭ HMSPollState: "created" | "started" | "stopped"


HMSPreferredSimulcastLayer

Ƭ HMSPreferredSimulcastLayer: Exclude<HMSSimulcastLayer, NONE>


HMSRoleName

Ƭ HMSRoleName: string


HMSRoomID

Ƭ HMSRoomID: string


HMSTrack

Ƭ HMSTrack: HMSVideoTrack | HMSAudioTrack | HMSScreenVideoTrack | HMSScreenAudioTrack


HMSTrackDisplaySurface

Ƭ HMSTrackDisplaySurface: "application" | "browser" | "selfBrowser" | "monitor" | "window"

Use this to identify what is being screenshared, not all browsers will support everything.

application - all windows of an application are shared window - a particular window is being shared monitor - full screen share of a monitor display browser - a browser tab is shared selfBrowser - the current browser tab is being shared


HMSTrackFacingMode

Ƭ HMSTrackFacingMode: "user" | "environment" | "left" | "right"


HMSTrackID

Ƭ HMSTrackID: string


HMSTrackSource

Ƭ HMSTrackSource: "regular" | "screen" | "plugin" | "audioplaylist" | "videoplaylist" | string


HMSTrackType

Ƭ HMSTrackType: "audio" | "video"


MappedNotifications

Ƭ MappedNotifications<Type>: { [index in keyof Type]: HMSNotificationMapping<Type[index]> }

Type parameters

NameType
Typeextends HMSNotificationTypes[]

RID

Ƭ RID: "f" | "h" | "q"

Variables

parsedUserAgent

• Const parsedUserAgent: UAParserInstance


selectAudioPlaylist

• Const selectAudioPlaylist: HMSPlaylistSelector


selectHMSStats

• Const selectHMSStats: Object

Type declaration

NameType
availablePublishBitrateOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
availableSubscribeBitrateOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
jitterOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
localAudioTrackStatsOutputSelector<HMSStatsStore, undefined | HMSTrackStats, (res1: Record<string, undefined | HMSTrackStats[]>, res2: undefined | string) => undefined | HMSTrackStats>
localAudioTrackStatsByID(id?: string) => StoreSelector<HMSStatsStore, undefined | HMSTrackStats>
localPeerStatsOutputSelector<HMSStatsStore, undefined | HMSPeerStats, (res1: Record<string, undefined | HMSPeerStats>, res2: string) => undefined | HMSPeerStats>
localVideoTrackStatsOutputSelector<HMSStatsStore, undefined | HMSTrackStats, (res1: Record<string, undefined | HMSTrackStats[]>, res2: undefined | string) => undefined | HMSTrackStats>
localVideoTrackStatsByID(id?: string) => StoreSelector<HMSStatsStore, undefined | HMSTrackStats[]>
localVideoTrackStatsByLayer(layer?: HMSPreferredSimulcastLayer) => (id?: string) => StoreSelector<HMSStatsStore, undefined | HMSTrackStats>
packetsLostOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
peerStatsByID(id?: string) => StoreSelector<HMSStatsStore, undefined | HMSPeerStats>
publishBitrateOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
subscribeBitrateOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
totalBytesReceivedOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
totalBytesSentOutputSelector<HMSStatsStore, undefined | number, (res: undefined | HMSPeerStats) => undefined | number>
trackStatsByID(id?: string) => StoreSelector<HMSStatsStore, undefined | HMSTrackStats>

selectVideoPlaylist

• Const selectVideoPlaylist: HMSPlaylistSelector


simulcastMapping

• Const simulcastMapping: Object

Type declaration

Functions

createDefaultStatsStore

â–¸ createDefaultStatsStore(): HMSStatsStore

Returns

HMSStatsStore


getAudioDeviceCategory

â–¸ getAudioDeviceCategory(deviceLabel?): HMSAudioDeviceCategory

Parameters

NameType
deviceLabel?string

Returns

HMSAudioDeviceCategory


selectAppData

â–¸ selectAppData(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, any>

Select a particular key from ui app data by passed in key. if key is not passed, full data is returned.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, any>


selectAppDataByPath

â–¸ selectAppDataByPath(...keys): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | Record<string, any>, (res: undefined | Record<string, any>) => undefined | Record<string, any>>

Parameters

NameType
...keysstring[]

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | Record<string, any>, (res: undefined | Record<string, any>) => undefined | Record<string, any>>


selectAudioPlaylistTrackByPeerID

â–¸ selectAudioPlaylistTrackByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>


selectAudioTrackByID

â–¸ selectAudioTrackByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack>

Select the HMSAudioTrack object given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack>


selectAudioTrackByPeerID

â–¸ selectAudioTrackByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>

Select the primary audio track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>


selectAudioTrackVolume

â–¸ selectAudioTrackVolume(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>

Select the local audio volume of an audio track given a track ID.

NOTE: Volume of a track is different from Audio Level of a track,

  • Audio Level measures the audio of a track and it comes from 100ms's servers.
  • Volume is how loud you hear the audio of a track, this is controlled by you at the client side.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>


selectAudioVolumeByPeerID

â–¸ selectAudioVolumeByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>

Select the local audio volume of the primary audio track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>


selectAuxiliaryAudioByPeerID

â–¸ selectAuxiliaryAudioByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>

Select the first auxiliary audio track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>


selectAuxiliaryTracksByPeerID

â–¸ selectAuxiliaryTracksByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSTrack[]>

Select an array of auxiliary tracks of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSTrack[]>


selectAvailableRoleNames

â–¸ selectAvailableRoleNames(state): string[]

Select an array of names of available roles in the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

string[]


selectBroadcastMessages

â–¸ selectBroadcastMessages(state): HMSMessage[]

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSMessage[]


selectBroadcastMessagesUnreadCount

â–¸ selectBroadcastMessagesUnreadCount(state): number

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

number


selectCameraStreamByPeerID

â–¸ selectCameraStreamByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>

Select the camera stream of a peer given a peer ID. This is the primary video track of a peer.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>


selectConnectionQualities

â–¸ selectConnectionQualities(store): Record<string, HMSConnectionQuality>

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, HMSConnectionQuality>


selectConnectionQualityByPeerID

â–¸ selectConnectionQualityByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSConnectionQuality>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSConnectionQuality>


selectDegradedTracks

â–¸ selectDegradedTracks(state): HMSVideoTrack[]

Select an array of tracks that have been degraded(receiving lower video quality/no video) due to bad network locally.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSVideoTrack[]


selectDevices

â–¸ selectDevices(store): DeviceMap

Select the available audio input, audio output and video input devices on your machine.

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

DeviceMap

An object of array of available audio input, audio output and video input devices.

type DeviceMap = { audioInput: InputDeviceInfo[]; audioOutput: MediaDeviceInfo[]; videoInput: InputDeviceInfo[]; }

selectDidIJoinWithin

â–¸ selectDidIJoinWithin(timeMs): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean, (res: HMSRoom) => undefined | boolean>

Returns a boolean to indicate if the local peer joined within the past timeMs milliseconds.

Ex: to know if the local peer joined within the last one second

const joinedWithinASecond = useHMSStore(selectDidIJoinWithin(1000));

Parameters

NameType
timeMsnumber

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean, (res: HMSRoom) => undefined | boolean>


selectDominantSpeaker

â–¸ selectDominantSpeaker(state): null | HMSPeer

Select the peer who's speaking the loudest at the moment

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

null | HMSPeer


selectEffectsKey

â–¸ selectEffectsKey(state): undefined | string

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectErrors

â–¸ selectErrors(store): HMSException[]

Select the current [] object to monitor the error logs

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSException[]


selectHLSState

â–¸ selectHLSState(state): HMSHLS

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSHLS


selectHMSBroadcastMessages

â–¸ selectHMSBroadcastMessages(state): HMSMessage[]

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSMessage[]


selectHMSMessages

â–¸ selectHMSMessages(state): HMSMessage[]

Select an array of messages in the room(sent and received).

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSMessage[]


selectHMSMessagesCount

â–¸ selectHMSMessagesCount(state): number

Select the number of messages(sent and received).

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

number


selectHandRaisedPeers

â–¸ selectHandRaisedPeers(state): HMSPeer[]

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPeer[]


selectHasPeerHandRaised

â–¸ selectHasPeerHandRaised(peerId): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: null | HMSPeer) => boolean>

Parameters

NameType
peerIdstring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: null | HMSPeer) => boolean>


selectIsAllowedToPreviewMedia

â–¸ selectIsAllowedToPreviewMedia(state): HMSPublishAllowed

Select what streams is the local peer allowed to preview from video, audio

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPublishAllowed


selectIsAllowedToPublish

â–¸ selectIsAllowedToPublish(state): HMSPublishAllowed

Select what streams is the local peer allowed to publish from video, audio and screenshare.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPublishAllowed


selectIsAllowedToSubscribe

â–¸ selectIsAllowedToSubscribe(state): boolean

Select a boolean denoting whether if your local peer is allowed to subscribe to any other role.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsAudioLocallyMuted

â–¸ selectIsAudioLocallyMuted(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>

Select a boolean denoting whether you've muted an audio track locally(only for you) given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>


selectIsConnectedToRoom

â–¸ selectIsConnectedToRoom(state): undefined | boolean

Select a boolean flag denoting whether you've joined a room. NOTE: Returns true only after join, returns false during preview.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | boolean


selectIsEffectsEnabled

â–¸ selectIsEffectsEnabled(state): boolean

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsInPreview

â–¸ selectIsInPreview(state): boolean

Select a boolean denoting whether the room is in Preview state.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsLargeRoom

â–¸ selectIsLargeRoom(state): boolean

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsLocalAudioEnabled

â–¸ selectIsLocalAudioEnabled(store): boolean

Select a boolean denoting whether your local audio is unmuted and the audio from your microphone is shared to remote peers

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsLocalAudioPluginPresent

â–¸ selectIsLocalAudioPluginPresent(pluginName): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: string[]) => boolean>

Parameters

NameType
pluginNamestring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: string[]) => boolean>


selectIsLocalScreenShared

â–¸ selectIsLocalScreenShared(state): boolean

Select a boolean denoting whether your screen is shared to remote peers in the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsLocalVideoDisplayEnabled

â–¸ selectIsLocalVideoDisplayEnabled(store): undefined | boolean

Select a boolean denoting whether you've chosen to unmute and share your local video.

NOTE: Once you call hmsActions.setLocalVideoEnabled(true)to unmute your local video, it takes some time to fetch your video from your video source. This displayEnabled property gives immediate feedback for a more interactive UI, without waiting for the video source

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | boolean


selectIsLocalVideoEnabled

â–¸ selectIsLocalVideoEnabled(store): boolean

Select a boolean denoting whether your local video is unmuted and the video from your camera is shared to remote peers

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsLocalVideoPluginPresent

â–¸ selectIsLocalVideoPluginPresent(pluginName): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: string[]) => boolean>

Parameters

NameType
pluginNamestring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: string[]) => boolean>


selectIsLocallyMutedByPeerID

â–¸ selectIsLocallyMutedByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>

Select a boolean denoting whether you've muted the primary audio track of a peer locally(only for you) given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>


selectIsPeerAudioEnabled

â–¸ selectIsPeerAudioEnabled(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean>

Select a boolean denoting whether a peer has unmuted audio and sharing it to other peers.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean>


selectIsPeerVideoEnabled

â–¸ selectIsPeerVideoEnabled(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean>

Select a boolean denoting whether a peer has unmuted video and sharing it to other peers.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean>


selectIsRoleAllowedToPublish

â–¸ selectIsRoleAllowedToPublish(roleName): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPublishAllowed, (res: HMSRole) => HMSPublishAllowed>

Parameters

NameType
roleNamestring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPublishAllowed, (res: HMSRole) => HMSPublishAllowed>


selectIsScreenShareLocallyMutedByPeerID

â–¸ selectIsScreenShareLocallyMutedByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>

Select a boolean denoting whether you've muted the screen share audio track of a peer locally(only for you) given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | boolean>


selectIsSomeoneScreenSharing

â–¸ selectIsSomeoneScreenSharing(state): boolean

Select a boolean denoting whether someone is sharing screen in the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsTranscriptionAllowedByMode

â–¸ selectIsTranscriptionAllowedByMode(mode): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: null | HMSRole) => boolean>

Parameters

NameType
modeCAPTION

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, boolean, (res: null | HMSRole) => boolean>


selectIsTranscriptionEnabled

â–¸ selectIsTranscriptionEnabled(state): boolean

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectIsVBEnabled

â–¸ selectIsVBEnabled(state): boolean

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectLocalAudioTrackID

â–¸ selectLocalAudioTrackID(state): undefined | string

Select the track ID of your local peer's primary audio track

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectLocalMediaSettings

â–¸ selectLocalMediaSettings(store): HMSMediaSettings

Select your media settings i.e., choosen audio input device, audio output device and video input device, audio mode

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSMediaSettings


selectLocalPeer

â–¸ selectLocalPeer(state): undefined | HMSPeer

Select the local peer object object assigned to you.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSPeer


selectLocalPeerID

â–¸ selectLocalPeerID(state): string

Select the peer ID of your local peer.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

string


selectLocalPeerName

â–¸ selectLocalPeerName(state): undefined | string

Select the peer name of your local peer.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectLocalPeerRole

â–¸ selectLocalPeerRole(state): null | HMSRole

Select the HMSRole object of your local peer.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

null | HMSRole


selectLocalPeerRoleName

â–¸ selectLocalPeerRoleName(state): undefined | string

Select the role name of your local peer.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectLocalTrackIDs

â–¸ selectLocalTrackIDs(state): string[]

Select an array of track IDs of all your local peer's tracks

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

string[]


selectLocalVideoTrackID

â–¸ selectLocalVideoTrackID(state): undefined | string

Select the track ID of your local peer's primary video track

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectMessageByMessageID

â–¸ selectMessageByMessageID(id): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSMessage, (res: Record<string, HMSMessage>) => HMSMessage>

Parameters

NameType
idstring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSMessage, (res: Record<string, HMSMessage>) => HMSMessage>


selectMessageIDsInOrder

â–¸ selectMessageIDsInOrder(store): string[]

Select IDs of messages you've sent or received sorted chronologically.

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

string[]


selectMessagesByPeerID

â–¸ selectMessagesByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSMessage[]>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSMessage[]>


selectMessagesByRole

â–¸ selectMessagesByRole(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSMessage[]>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSMessage[]>


selectMessagesUnreadCountByPeerID

â–¸ selectMessagesUnreadCountByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>


selectMessagesUnreadCountByRole

â–¸ selectMessagesUnreadCountByRole(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>


selectPeerAudioByID

â–¸ selectPeerAudioByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>

Select audio level of audioTrack of a peer given a peer IDĂź.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>


selectPeerByCondition

â–¸ selectPeerByCondition(predicate): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSPeer, (res: HMSPeer[]) => undefined | HMSPeer>

Selects the first peer passing the condition given by the argument predicate function

Ex: to select a peer whose metadata has spotlight set to true(assuming peer.metadata is a valid json string), use

const spotlightPeer = useHMSStore(selectPeerByCondition(peer => JSON.parse(peer.metadata).spotlight));

Parameters

NameType
predicate(peer: HMSPeer) => boolean

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSPeer, (res: HMSPeer[]) => undefined | HMSPeer>


selectPeerByID

â–¸ selectPeerByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSPeer>

Select the HMSPeer object given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSPeer>


selectPeerCount

â–¸ selectPeerCount(state): number

selectPeerCount gives the number of peers Inside the room. This doesn't count the local peer if they're still in preview and haven't yet joined the room. Note that this will not necessarily equal the number of peers received through selectPeers, it's possible to know total number of people in the room without having details of everyone depending on dashboard settings.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

number


selectPeerMetadata

â–¸ selectPeerMetadata(peerId): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, any, (res: null | HMSPeer) => any>

Selects the peer metadata for the passed in peer and returns it as JSON. If metadata is not present or conversion to JSON gives an error, an empty object is returned. Please directly use peer.metadata in case the metadata is not JSON by design.

Parameters

NameType
peerIdstring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, any, (res: null | HMSPeer) => any>


selectPeerName

â–¸ selectPeerName(peerId): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | string, (res: null | HMSPeer) => undefined | string>

Parameters

NameType
peerIdstring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | string, (res: null | HMSPeer) => undefined | string>


selectPeerNameByID

â–¸ selectPeerNameByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | string>

Select the name of a HMSPeer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | string>


selectPeerScreenSharing

â–¸ selectPeerScreenSharing(state): undefined | HMSPeer

Select the first peer who is currently sharing their screen.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSPeer


selectPeerSharingAudio

â–¸ selectPeerSharingAudio(state): undefined | HMSPeer

Select the first peer who is currently sharing their audio only screen

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSPeer


selectPeerSharingAudioPlaylist

â–¸ selectPeerSharingAudioPlaylist(state): undefined | HMSPeer

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSPeer


selectPeerSharingVideoPlaylist

â–¸ selectPeerSharingVideoPlaylist(state): undefined | HMSPeer

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSPeer


selectPeerTypeByID

â–¸ selectPeerTypeByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSPeerType>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSPeerType>


selectPeers

â–¸ selectPeers(state): HMSPeer[]

Select an array of peers(remote peers and your local peer) present in the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPeer[]


selectPeersByCondition

â–¸ selectPeersByCondition(predicate): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>

Selects all peers passing the condition given by the argument predicate function

Ex: to select peers with isHandRaised set to true in their metadata(assuming peer.metadata is a valid json string), use

const handRaisedPeers = useHMSStore(selectPeersByCondition(peer => JSON.parse(peer.metadata).isHandRaised));

Parameters

NameType
predicate(peer: HMSPeer) => boolean

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>


selectPeersByRole

â–¸ selectPeersByRole(role): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>

Select an array of peers of a particular role

Parameters

NameTypeDescription
rolestringHMSRoleName

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>

HMSPeer[]


selectPeersByRoles

â–¸ selectPeersByRoles(roles): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>

Select an array of peers of a particular role

Parameters

NameTypeDescription
rolesstring[]HMSRoleName[]

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>

HMSPeer[]


selectPeersScreenSharing

â–¸ selectPeersScreenSharing(state): HMSPeer[]

Select an array of peers who are currently sharing their screen.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPeer[]


selectPeersWithAudioStatus

â–¸ selectPeersWithAudioStatus(state): HMSPeerWithMuteStatus[]

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPeerWithMuteStatus[]


selectPermissions

â–¸ selectPermissions(state): undefined | { browserRecording: boolean ; changeRole: boolean ; endRoom: boolean ; hlsStreaming: boolean ; mute: boolean ; pollRead: boolean ; pollWrite: boolean ; removeOthers: boolean ; rtmpStreaming: boolean ; transcriptions?: Record<CAPTION, HMSPermissionType[]> ; unmute: boolean ; whiteboard?: HMSPermissionType[] }

Select the permissions which determine what actions the local peer can do.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | { browserRecording: boolean ; changeRole: boolean ; endRoom: boolean ; hlsStreaming: boolean ; mute: boolean ; pollRead: boolean ; pollWrite: boolean ; removeOthers: boolean ; rtmpStreaming: boolean ; transcriptions?: Record<CAPTION, HMSPermissionType[]> ; unmute: boolean ; whiteboard?: HMSPermissionType[] }


selectPollByID

â–¸ selectPollByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSPoll>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSPoll>


selectPolls

â–¸ selectPolls(store): HMSPoll[]

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPoll[]


selectPollsMap

â–¸ selectPollsMap(store): Record<string, HMSPoll>

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, HMSPoll>


selectPreviewRole

â–¸ selectPreviewRole(state): null | HMSRole

Select the HMSRole used for preview.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

null | HMSRole


selectPreviewRoleName

â–¸ selectPreviewRoleName(store): undefined | string

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | string


selectRTMPState

â–¸ selectRTMPState(state): HMSRTMP

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSRTMP


selectRecentError

â–¸ selectRecentError(state): undefined | null | HMSException

It will help to get the all the error

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | null | HMSException


selectRecordingState

â–¸ selectRecordingState(state): HMSRecording

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSRecording


selectRemotePeers

â–¸ selectRemotePeers(state): HMSPeer[]

Select remote peers(other users you're connected with via the internet) present in the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSPeer[]


selectRoleByRoleName

â–¸ selectRoleByRoleName(roleName): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSRole, (res: Record<string, HMSRole>) => HMSRole>

Parameters

NameType
roleNamestring

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSRole, (res: Record<string, HMSRole>) => HMSRole>


selectRoleChangeRequest

â–¸ selectRoleChangeRequest(state): null | HMSRoleChangeRequest

Select the role change request received for your local peer.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

null | HMSRoleChangeRequest


selectRolesMap

â–¸ selectRolesMap(store): Record<string, HMSRole>

Select available roles in the room as a map between the role name and HMSRole object.

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, HMSRole>


selectRoom

â–¸ selectRoom(store): HMSRoom

Select the current HMSRoom object to which you are connected.

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSRoom


selectRoomID

â–¸ selectRoomID(state): string

Select the ID of the current room to which you are connected.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

string


selectRoomStartTime

â–¸ selectRoomStartTime(state): undefined | Date

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | Date


selectRoomStarted

â–¸ selectRoomStarted(state): boolean

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

boolean


selectRoomState

â–¸ selectRoomState(state): HMSRoomState

Select the current state of the room.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

HMSRoomState


selectScreenAudioTrackByID

â–¸ selectScreenAudioTrackByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack>

Select the HMSScreenAudioTrack object given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack>


selectScreenShareAudioByPeerID

â–¸ selectScreenShareAudioByPeerID(id?): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSScreenAudioTrack, (res: { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }) => HMSScreenAudioTrack>

Select the screen share audio track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSScreenAudioTrack, (res: { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }) => HMSScreenAudioTrack>


selectScreenShareByPeerID

â–¸ selectScreenShareByPeerID(id?): OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSScreenVideoTrack, (res: { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }) => HMSScreenVideoTrack>

Select the screen share video track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

OutputSelector<HMSStore<{ sessionStore: Record<string, any> }>, HMSScreenVideoTrack, (res: { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }) => HMSScreenVideoTrack>


selectScreenSharesByPeerId

â–¸ selectScreenSharesByPeerId(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, { audio: HMSScreenAudioTrack ; video: HMSScreenVideoTrack }>


selectScreenVideoTrackByID

â–¸ selectScreenVideoTrackByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSScreenVideoTrack>

Select the HMSScreenVideoTrack object given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSScreenVideoTrack>


selectScreenshareAudioVolumeByPeerID

â–¸ selectScreenshareAudioVolumeByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>

Select the local audio volume of the screen share of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | number>


selectSessionId

â–¸ selectSessionId(state): string

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

string


selectSessionMetadata

â–¸ selectSessionMetadata(store): any

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

any

Deprecated

  • use selectSessionStore instead

selectSessionStore

â–¸ selectSessionStore<T>(): (store: HMSStore<T>) => T["sessionStore"] | undefined

Select a particular key from session store by passed in key. if key is not passed, full data is returned.

Type parameters

NameType
Textends HMSGenericTypes = { sessionStore: Record<string, any> }

Returns

fn

â–¸ (store): T["sessionStore"] | undefined

Parameters
NameType
storeHMSStore<T>
Returns

T["sessionStore"] | undefined

â–¸ selectSessionStore<T, K>(key): (store: HMSStore<T>) => T["sessionStore"][K] | undefined

Type parameters

NameType
Textends HMSGenericTypes = { sessionStore: Record<string, any> }
Kextends string | number | symbol = keyof T["sessionStore"]

Parameters

NameType
keyK

Returns

fn

â–¸ (store): T["sessionStore"][K] | undefined

Parameters
NameType
storeHMSStore<T>
Returns

T["sessionStore"][K] | undefined


selectSimulcastLayerByTrack

â–¸ selectSimulcastLayerByTrack(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSSimulcastLayer>

Select the current simulcast layer of a track given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSSimulcastLayer>


selectSpeakers

â–¸ selectSpeakers(store): Record<string, HMSSpeaker>

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, HMSSpeaker>


selectTemplateAppData

â–¸ selectTemplateAppData(store): Record<string, string>

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, string>


selectTrackAudioByID

â–¸ selectTrackAudioByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>

Select the audio level of a track given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, number>


selectTrackByID

â–¸ selectTrackByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack | HMSVideoTrack | HMSScreenVideoTrack>

Select the HMSTrack object given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSAudioTrack | HMSVideoTrack | HMSScreenVideoTrack>


selectTranscriptionsState

â–¸ selectTranscriptionsState(state): undefined | HMSTranscriptionInfo[]

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSTranscriptionInfo[]


selectUnreadHMSBroadcastMessagesCount

â–¸ selectUnreadHMSBroadcastMessagesCount(state): number

Select the number of unread broadcast messages

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

number


selectUnreadHMSMessagesCount

â–¸ selectUnreadHMSMessagesCount(state): number

Select the number of unread messages.

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

number


selectVideoPlaylistAudioTrackByPeerID

â–¸ selectVideoPlaylistAudioTrackByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSAudioTrack>


selectVideoPlaylistVideoTrackByPeerID

â–¸ selectVideoPlaylistVideoTrackByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>

takes in a normal selector which has store and id as input and curries it to make it easier to use. Before: store.getState((store) => normalSelector(store, peerID)) After: store.getState(curriedSelector(peerID))

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>


selectVideoTrackByID

â–¸ selectVideoTrackByID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSVideoTrack>

Select the HMSVideoTrack object given a track ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, null | HMSVideoTrack>


selectVideoTrackByPeerID

â–¸ selectVideoTrackByPeerID(id?): StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>

Select the primary video track of a peer given a peer ID.

Parameters

NameType
id?string

Returns

StoreSelector<HMSStore<{ sessionStore: Record<string, any> }>, undefined | HMSVideoTrack>


selectWhiteboard

â–¸ selectWhiteboard(state): undefined | HMSWhiteboard

select the primary/first whiteboard of a session

Parameters

NameType
stateHMSStore<{ sessionStore: Record<string, any> }>

Returns

undefined | HMSWhiteboard


selectWhiteboards

â–¸ selectWhiteboards(store): Record<string, HMSWhiteboard>

select a map of all the whiteboards in the session

Parameters

NameType
storeHMSStore<{ sessionStore: Record<string, any> }>

Returns

Record<string, HMSWhiteboard>


Have a suggestion? Recommend changes ->
EnumerationsClassesCore InterfacesOther InterfacesReferencesIHMSNotificationsType AliasesHMSGroupNameHMSICEServerHMSMessageIDHMSNotificationHMSNotificationCallbackHMSNotificationInCallbackHMSNotificationMappingHMSNotificationTypeParamHMSPeerIDHMSPollStateHMSPreferredSimulcastLayerHMSRoleNameHMSRoomIDHMSTrackHMSTrackDisplaySurfaceHMSTrackFacingModeHMSTrackIDHMSTrackSourceHMSTrackTypeMappedNotificationsRIDVariablesparsedUserAgentselectAudioPlaylistselectHMSStatsselectVideoPlaylistsimulcastMappingFunctionscreateDefaultStatsStoregetAudioDeviceCategoryselectAppDataselectAppDataByPathselectAudioPlaylistTrackByPeerIDselectAudioTrackByIDselectAudioTrackByPeerIDselectAudioTrackVolumeselectAudioVolumeByPeerIDselectAuxiliaryAudioByPeerIDselectAuxiliaryTracksByPeerIDselectAvailableRoleNamesselectBroadcastMessagesselectBroadcastMessagesUnreadCountselectCameraStreamByPeerIDselectConnectionQualitiesselectConnectionQualityByPeerIDselectDegradedTracksselectDevicesselectDidIJoinWithinselectDominantSpeakerselectEffectsKeyselectErrorsselectHLSStateselectHMSBroadcastMessagesselectHMSMessagesselectHMSMessagesCountselectHandRaisedPeersselectHasPeerHandRaisedselectIsAllowedToPreviewMediaselectIsAllowedToPublishselectIsAllowedToSubscribeselectIsAudioLocallyMutedselectIsConnectedToRoomselectIsEffectsEnabledselectIsInPreviewselectIsLargeRoomselectIsLocalAudioEnabledselectIsLocalAudioPluginPresentselectIsLocalScreenSharedselectIsLocalVideoDisplayEnabledselectIsLocalVideoEnabledselectIsLocalVideoPluginPresentselectIsLocallyMutedByPeerIDselectIsPeerAudioEnabledselectIsPeerVideoEnabledselectIsRoleAllowedToPublishselectIsScreenShareLocallyMutedByPeerIDselectIsSomeoneScreenSharingselectIsTranscriptionAllowedByModeselectIsTranscriptionEnabledselectIsVBEnabledselectLocalAudioTrackIDselectLocalMediaSettingsselectLocalPeerselectLocalPeerIDselectLocalPeerNameselectLocalPeerRoleselectLocalPeerRoleNameselectLocalTrackIDsselectLocalVideoTrackIDselectMessageByMessageIDselectMessageIDsInOrderselectMessagesByPeerIDselectMessagesByRoleselectMessagesUnreadCountByPeerIDselectMessagesUnreadCountByRoleselectPeerAudioByIDselectPeerByConditionselectPeerByIDselectPeerCountselectPeerMetadataselectPeerNameselectPeerNameByIDselectPeerScreenSharingselectPeerSharingAudioselectPeerSharingAudioPlaylistselectPeerSharingVideoPlaylistselectPeerTypeByIDselectPeersselectPeersByConditionselectPeersByRoleselectPeersByRolesselectPeersScreenSharingselectPeersWithAudioStatusselectPermissionsselectPollByIDselectPollsselectPollsMapselectPreviewRoleselectPreviewRoleNameselectRTMPStateselectRecentErrorselectRecordingStateselectRemotePeersselectRoleByRoleNameselectRoleChangeRequestselectRolesMapselectRoomselectRoomIDselectRoomStartTimeselectRoomStartedselectRoomStateselectScreenAudioTrackByIDselectScreenShareAudioByPeerIDselectScreenShareByPeerIDselectScreenSharesByPeerIdselectScreenVideoTrackByIDselectScreenshareAudioVolumeByPeerIDselectSessionIdselectSessionMetadataselectSessionStoreselectSimulcastLayerByTrackselectSpeakersselectTemplateAppDataselectTrackAudioByIDselectTrackByIDselectTranscriptionsStateselectUnreadHMSBroadcastMessagesCountselectUnreadHMSMessagesCountselectVideoPlaylistAudioTrackByPeerIDselectVideoPlaylistVideoTrackByPeerIDselectVideoTrackByIDselectVideoTrackByPeerIDselectWhiteboardselectWhiteboards

Was this helpful?

1234