Web SDK API Reference
Enumerations
- ConnectivityState
- DeviceType
- DomainCategory
- HLSPlaylistType
- HLSStreamType
- HMSAudioDeviceCategory
- HMSAudioMode
- HMSAudioPluginType
- HMSLogLevel
- HMSNotificationSeverity
- HMSNotificationTypes
- HMSPeerType
- HMSPlaylistType
- HMSPluginUnsupportedTypes
- HMSPollQuestionType
- HMSPollStates
- HMSRecordingState
- HMSRoomState
- HMSSimulcastLayer
- HMSTrackExceptionTrackType
- HMSTranscriptionMode
- HMSTranscriptionState
- HMSVideoPluginCanvasContextType
- HMSVideoPluginType
Classes
Core Interfaces
Other Interfaces
- ConnectivityCheckResult
- DebugInfo
- DeviceMap
- DiagnosticsRTCStats
- DiagnosticsRTCStatsReport
- HLSConfig
- HLSMeetingURLVariant
- HLSVariant
- HMSAudioPlugin
- HMSAudioTrack
- HMSAudioTrackSettings
- HMSChangeMultiTrackStateParams
- HMSChangeMultiTrackStateRequest
- HMSChangeMultiTrackStateRequestNotification
- HMSChangeTrackStateRequest
- HMSChangeTrackStateRequestNotification
- HMSConfig
- HMSConfigInitialSettings
- HMSDeviceChangeEvent
- HMSDeviceChangeEventNotification
- HMSDiagnosticsConnectivityListener
- HMSDiagnosticsInterface
- HMSException
- HMSExceptionNotification
- HMSFrameworkInfo
- HMSGenericTypes
- HMSHLS
- HMSLeaveRoomRequest
- HMSLeaveRoomRequestNotification
- HMSLocalTrackStats
- HMSMediaSettings
- HMSMediaStreamPlugin
- HMSMessage
- HMSMessageNotification
- HMSPeer
- HMSPeerListIterator
- HMSPeerListIteratorOptions
- HMSPeerListNotification
- HMSPeerNotification
- HMSPeerStats
- HMSPeerWithMuteStatus
- HMSPlaylist
- HMSPlaylistItem
- HMSPlaylistItemNotification
- HMSPlaylistSelection
- HMSPlaylistSelector
- HMSPluginSupportResult
- HMSPoll
- HMSPollCreateParams
- HMSPollNotification
- HMSPollQuestion
- HMSPollQuestionAnswer
- HMSPollQuestionCreateParams
- HMSPollQuestionOption
- HMSPollQuestionOptionCreateParams
- HMSPreviewConfig
- HMSPublishAllowed
- HMSQuizLeaderboardResponse
- HMSQuizLeaderboardSummary
- HMSRTMP
- HMSReconnectionNotification
- HMSRecording
- HMSRemoteTrackStats
- HMSRole
- HMSRoleChangeRequest
- HMSRoleChangeStoreRequest
- HMSRoom
- HMSScreenAudioTrack
- HMSScreenShareConfig
- HMSScreenVideoTrack
- HMSSimulcastLayerDefinition
- HMSSpeaker
- HMSStatsStore
- HMSStatsStoreWrapper
- HMSStore
- HMSTrackException
- HMSTrackNotification
- HMSTrackStats
- HMSTranscriptionInfo
- HMSTranscriptionNotification
- HMSVideoPlugin
- HMSVideoTrack
- HMSVideoTrackSettings
- IHMSPlaylistActions
- IHMSSessionStoreActions
- IHMSStatsStore
- IHMSStore
- MediaPermissionCheck
- MediaServerReport
- RTMPRecordingConfig
- ScreenCaptureHandle
- SignallingReport
- TokenRequest
- TokenRequestOptions
References
IHMSNotifications
Renames and re-exports HMSNotifications
Type Aliases
HMSGroupName
Ƭ HMSGroupName: string
HMSICEServer
Ƭ HMSICEServer: Object
Type declaration
Name | Type |
---|---|
password? | string |
urls | string [] |
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
Name | Type |
---|---|
T | extends HMSNotificationTypeParam |
Type declaration
▸ (notification
): void
Parameters
Name | Type |
---|---|
notification | HMSNotificationInCallback <T > |
Returns
void
HMSNotificationInCallback
Ƭ HMSNotificationInCallback<T
>: T
extends HMSNotificationTypes
[] ? MappedNotifications
<T
>[number
] : T
extends HMSNotificationTypes
? HMSNotificationMapping
<T
> : HMSNotification
Type parameters
Name | Type |
---|---|
T | extends 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
Name | Type |
---|---|
T | extends HMSNotificationTypes |
C | any |
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
Name | Type |
---|---|
Type | extends HMSNotificationTypes [] |
RID
Ƭ RID: "f"
| "h"
| "q"
Variables
parsedUserAgent
• Const
parsedUserAgent: UAParserInstance
selectAudioPlaylist
• Const
selectAudioPlaylist: HMSPlaylistSelector
selectHMSStats
• Const
selectHMSStats: Object
Type declaration
Name | Type |
---|---|
availablePublishBitrate | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
availableSubscribeBitrate | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
jitter | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
localAudioTrackStats | OutputSelector <HMSStatsStore , undefined | HMSTrackStats , (res1 : Record <string , undefined | HMSTrackStats []>, res2 : undefined | string ) => undefined | HMSTrackStats > |
localAudioTrackStatsByID | (id? : string ) => StoreSelector <HMSStatsStore , undefined | HMSTrackStats > |
localPeerStats | OutputSelector <HMSStatsStore , undefined | HMSPeerStats , (res1 : Record <string , undefined | HMSPeerStats >, res2 : string ) => undefined | HMSPeerStats > |
localVideoTrackStats | OutputSelector <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 > |
packetsLost | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
peerStatsByID | (id? : string ) => StoreSelector <HMSStatsStore , undefined | HMSPeerStats > |
publishBitrate | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
subscribeBitrate | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
totalBytesReceived | OutputSelector <HMSStatsStore , undefined | number , (res : undefined | HMSPeerStats ) => undefined | number > |
totalBytesSent | OutputSelector <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
getAudioDeviceCategory
▸ getAudioDeviceCategory(deviceLabel?
): HMSAudioDeviceCategory
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
...keys | string [] |
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
string
[]
selectBroadcastMessages
▸ selectBroadcastMessages(state
): HMSMessage
[]
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectBroadcastMessagesUnreadCount
▸ selectBroadcastMessagesUnreadCount(state
): number
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, undefined
| HMSVideoTrack
>
selectConnectionQualities
▸ selectConnectionQualities(store
): Record
<string
, HMSConnectionQuality
>
Parameters
Name | Type |
---|---|
store | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectDevices
▸ selectDevices(store
): DeviceMap
Select the available audio input, audio output and video input devices on your machine.
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
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
Name | Type |
---|---|
timeMs | number |
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
null
| HMSPeer
selectEffectsKey
▸ selectEffectsKey(state
): undefined
| string
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| string
selectErrors
▸ selectErrors(store
): HMSException
[]
Select the current [] object to monitor the error logs
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectHLSState
▸ selectHLSState(state
): HMSHLS
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectHMSBroadcastMessages
▸ selectHMSBroadcastMessages(state
): HMSMessage
[]
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectHMSMessages
▸ selectHMSMessages(state
): HMSMessage
[]
Select an array of messages in the room(sent and received).
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectHMSMessagesCount
▸ selectHMSMessagesCount(state
): number
Select the number of messages(sent and received).
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
number
selectHandRaisedPeers
▸ selectHandRaisedPeers(state
): HMSPeer
[]
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
HMSPeer
[]
selectHasPeerHandRaised
▸ selectHasPeerHandRaised(peerId
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
, (res
: null
| HMSPeer
) => boolean
>
Parameters
Name | Type |
---|---|
peerId | string |
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectIsAllowedToPublish
▸ selectIsAllowedToPublish(state
): HMSPublishAllowed
Select what streams is the local peer allowed to publish from video, audio and screenshare.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectIsAllowedToSubscribe
▸ selectIsAllowedToSubscribe(state
): boolean
Select a boolean denoting whether if your local peer is allowed to subscribe to any other role.
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| boolean
selectIsEffectsEnabled
▸ selectIsEffectsEnabled(state
): boolean
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsInPreview
▸ selectIsInPreview(state
): boolean
Select a boolean denoting whether the room is in Preview state.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsLargeRoom
▸ selectIsLargeRoom(state
): boolean
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsLocalAudioPluginPresent
▸ selectIsLocalAudioPluginPresent(pluginName
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
, (res
: string
[]) => boolean
>
Parameters
Name | Type |
---|---|
pluginName | string |
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
store | HMSStore <{ 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
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsLocalVideoPluginPresent
▸ selectIsLocalVideoPluginPresent(pluginName
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
, (res
: string
[]) => boolean
>
Parameters
Name | Type |
---|---|
pluginName | string |
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
>
selectIsRoleAllowedToPublish
▸ selectIsRoleAllowedToPublish(roleName
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, HMSPublishAllowed
, (res
: HMSRole
) => HMSPublishAllowed
>
Parameters
Name | Type |
---|---|
roleName | string |
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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsTranscriptionAllowedByMode
▸ selectIsTranscriptionAllowedByMode(mode
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
, (res
: null
| HMSRole
) => boolean
>
Parameters
Name | Type |
---|---|
mode | CAPTION |
Returns
OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, boolean
, (res
: null
| HMSRole
) => boolean
>
selectIsTranscriptionEnabled
▸ selectIsTranscriptionEnabled(state
): boolean
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectIsVBEnabled
▸ selectIsVBEnabled(state
): boolean
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectLocalAudioTrackID
▸ selectLocalAudioTrackID(state
): undefined
| string
Select the track ID of your local peer's primary audio track
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectLocalPeer
▸ selectLocalPeer(state
): undefined
| HMSPeer
Select the local peer object object assigned to you.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| HMSPeer
selectLocalPeerID
▸ selectLocalPeerID(state
): string
Select the peer ID of your local peer.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
string
selectLocalPeerName
▸ selectLocalPeerName(state
): undefined
| string
Select the peer name of your local peer.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| string
selectLocalPeerRole
▸ selectLocalPeerRole(state
): null
| HMSRole
Select the HMSRole object of your local peer.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
null
| HMSRole
selectLocalPeerRoleName
▸ selectLocalPeerRoleName(state
): undefined
| string
Select the role name of your local peer.
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
string
[]
selectLocalVideoTrackID
▸ selectLocalVideoTrackID(state
): undefined
| string
Select the track ID of your local peer's primary video track
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| string
selectMessageByMessageID
▸ selectMessageByMessageID(id
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, HMSMessage
, (res
: Record
<string
, HMSMessage
>) => HMSMessage
>
Parameters
Name | Type |
---|---|
id | string |
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
Name | Type |
---|---|
store | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
peerId | string |
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
Name | Type |
---|---|
peerId | string |
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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| HMSPeer
selectPeerSharingAudioPlaylist
▸ selectPeerSharingAudioPlaylist(state
): undefined
| HMSPeer
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| HMSPeer
selectPeerSharingVideoPlaylist
▸ selectPeerSharingVideoPlaylist(state
): undefined
| HMSPeer
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type | Description |
---|---|---|
role | string | HMSRoleName |
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
Name | Type | Description |
---|---|---|
roles | string [] | 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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
HMSPeer
[]
selectPeersWithAudioStatus
▸ selectPeersWithAudioStatus(state
): HMSPeerWithMuteStatus
[]
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, null
| HMSPoll
>
selectPolls
▸ selectPolls(store
): HMSPoll
[]
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
HMSPoll
[]
selectPollsMap
▸ selectPollsMap(store
): Record
<string
, HMSPoll
>
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
Record
<string
, HMSPoll
>
selectPreviewRole
▸ selectPreviewRole(state
): null
| HMSRole
Select the HMSRole used for preview.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
null
| HMSRole
selectPreviewRoleName
▸ selectPreviewRoleName(store
): undefined
| string
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| string
selectRTMPState
▸ selectRTMPState(state
): HMSRTMP
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectRecentError
▸ selectRecentError(state
): undefined
| null
| HMSException
It will help to get the all the error
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| null
| HMSException
selectRecordingState
▸ selectRecordingState(state
): HMSRecording
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectRemotePeers
▸ selectRemotePeers(state
): HMSPeer
[]
Select remote peers(other users you're connected with via the internet) present in the room.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
HMSPeer
[]
selectRoleByRoleName
▸ selectRoleByRoleName(roleName
): OutputSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, HMSRole
, (res
: Record
<string
, HMSRole
>) => HMSRole
>
Parameters
Name | Type |
---|---|
roleName | string |
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
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
Record
<string
, HMSRole
>
selectRoom
▸ selectRoom(store
): HMSRoom
Select the current HMSRoom object to which you are connected.
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectRoomID
▸ selectRoomID(state
): string
Select the ID of the current room to which you are connected.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
string
selectRoomStartTime
▸ selectRoomStartTime(state
): undefined
| Date
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| Date
selectRoomStarted
▸ selectRoomStarted(state
): boolean
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
boolean
selectRoomState
▸ selectRoomState(state
): HMSRoomState
Select the current state of the room.
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
selectScreenAudioTrackByID
▸ selectScreenAudioTrackByID(id?
): StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, null
| HMSAudioTrack
>
Select the HMSScreenAudioTrack object given a track ID.
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, undefined
| number
>
selectSessionId
▸ selectSessionId(state
): string
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
string
selectSessionMetadata
▸ selectSessionMetadata(store
): any
Parameters
Name | Type |
---|---|
store | HMSStore <{ 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
Name | Type |
---|---|
T | extends HMSGenericTypes = { sessionStore : Record <string , any > } |
Returns
fn
▸ (store
): T
["sessionStore"
] | undefined
Parameters
Name | Type |
---|---|
store | HMSStore <T > |
Returns
T
["sessionStore"
] | undefined
▸ selectSessionStore<T
, K
>(key
): (store
: HMSStore
<T
>) => T
["sessionStore"
][K
] | undefined
Type parameters
Name | Type |
---|---|
T | extends HMSGenericTypes = { sessionStore : Record <string , any > } |
K | extends string | number | symbol = keyof T ["sessionStore" ] |
Parameters
Name | Type |
---|---|
key | K |
Returns
fn
▸ (store
): T
["sessionStore"
][K
] | undefined
Parameters
Name | Type |
---|---|
store | HMSStore <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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, undefined
| HMSSimulcastLayer
>
selectSpeakers
▸ selectSpeakers(store
): Record
<string
, HMSSpeaker
>
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
Record
<string
, HMSSpeaker
>
selectTemplateAppData
▸ selectTemplateAppData(store
): Record
<string
, string
>
Parameters
Name | Type |
---|---|
store | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
id? | string |
Returns
StoreSelector
<HMSStore
<{ sessionStore
: Record
<string
, any
> }>, null
| HMSAudioTrack
| HMSVideoTrack
| HMSScreenVideoTrack
>
selectTranscriptionsState
▸ selectTranscriptionsState(state
): undefined
| HMSTranscriptionInfo
[]
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| HMSTranscriptionInfo
[]
selectUnreadHMSBroadcastMessagesCount
▸ selectUnreadHMSBroadcastMessagesCount(state
): number
Select the number of unread broadcast messages
Parameters
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
number
selectUnreadHMSMessagesCount
▸ selectUnreadHMSMessagesCount(state
): number
Select the number of unread messages.
Parameters
Name | Type |
---|---|
state | HMSStore <{ 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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
state | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
undefined
| HMSWhiteboard
selectWhiteboards
▸ selectWhiteboards(store
): Record
<string
, HMSWhiteboard
>
select a map of all the whiteboards in the session
Parameters
Name | Type |
---|---|
store | HMSStore <{ sessionStore : Record <string , any > }> |
Returns
Record
<string
, HMSWhiteboard
>