Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

HmsView

HmsView: ForwardRefExoticComponent<HmsViewProps & RefAttributes<any>> = ...
  • HmsView is react component that takes trackId and starts showing that track on a tile.
  • The appearance of tile is completely customizable with style prop.
  • Scale type can determine how the incoming video will fit in the canvas check HMSVideoViewMode for more information.
  • Mirror to flip the video vertically.

checkout https://www.100ms.live/docs/react-native/v2/features/render-video for more info

param
memberof

HMSSDK

Optional appStateSubscription

appStateSubscription: any

id

id: string

Optional knownRoles

knownRoles: HMSRole[]

Optional localPeer

localPeer: HMSLocalPeer

Private muteStatus

muteStatus: undefined | boolean

Optional onAudioDeviceChangedDelegate

onAudioDeviceChangedDelegate: any

Optional onChangeTrackStateRequestDelegate

onChangeTrackStateRequestDelegate: any

Optional onErrorDelegate

onErrorDelegate: any

Optional onJoinDelegate

onJoinDelegate: any

Optional onLocalAudioStatsDelegate

onLocalAudioStatsDelegate: any

Optional onLocalVideoStatsDelegate

onLocalVideoStatsDelegate: any

Optional onMessageDelegate

onMessageDelegate: any

Optional onPeerDelegate

onPeerDelegate: any

Optional onPreviewDelegate

onPreviewDelegate: any

Optional onReconnectedDelegate

onReconnectedDelegate: any

Optional onReconnectingDelegate

onReconnectingDelegate: any

Optional onRemoteAudioStatsDelegate

onRemoteAudioStatsDelegate: any

Optional onRemoteVideoStatsDelegate

onRemoteVideoStatsDelegate: any

Optional onRemovedFromRoomDelegate

onRemovedFromRoomDelegate: any

Optional onRoleChangeRequestDelegate

onRoleChangeRequestDelegate: any

Optional onRoomDelegate

onRoomDelegate: any

Optional onRtcStatsDelegate

onRtcStatsDelegate: any

Optional onSpeakerDelegate

onSpeakerDelegate: any

Optional onTrackDelegate

onTrackDelegate: any

Optional remotePeers

remotePeers: HMSRemotePeer[]

Optional room

room: HMSRoom

Methods

RTCStatsListener

  • RTCStatsListener(data: any): void

acceptRoleChange

  • acceptRoleChange(): Promise<any>

addAppStateListener

  • addAppStateListener(): void
    • This is a temporary solution for the situation when mic access is taken from the app and user returns to the app with no mic access. It will re-acquire the mic by setting the volume from native side
    memberof

    HMSSDK

    Returns void

addEventListener

attachListeners

  • attachListeners(): void
    • Attaches all the listeners to native callbacks. Note: this function connects sdk to native side and not app to sdk.
    memberof

    HMSSDK

    Returns void

attachPreviewListener

  • attachPreviewListener(): void
    • Attaches preview listener for native callbacks. Note:this function connects sdk to native side and not app to sdk.
    memberof

    HMSSDK

    Returns void

changeMetadata

  • changeMetadata(metadata: string): Promise<any>
    • changeMetadata changes a specific field in localPeer which is [metadata] it is a string that can be used for various functionalities like raiseHand, beRightBack and many more that explains the current status of the peer.
    • it is advised to use a json object in string format to store multiple dataPoints in metadata.

    checkout https://www.100ms.live/docs/react-native/v2/advanced-features/change-metadata for more info

    memberof

    HMSSDK

    Parameters

    • metadata: string

    Returns Promise<any>

changeName

  • changeName(name: string): Promise<any>

changeRole

  • changeRole(peer: HMSPeer, role: HMSRole, force?: boolean): Promise<any>
    • This function can be used in a situation when we want to change role hence manipulate their access and rights in the current room, it takes the peer HMSPeer whom role we want to change, role HMSRole which will be the new role for that peer and weather to forcefully change the role or ask the to accept the role change request using a boolean force.
    • if we change the role forcefully the peer's role will be updated without asking the peer otherwise the user will get the roleChangeRequest in roleChangeRequest listener. for more information on this checkout onRoleChangeRequestListener

    checkout https://www.100ms.live/docs/react-native/v2/features/change-role for more info

    memberof

    HMSSDK

    Parameters

    Returns Promise<any>

changeTrackState

  • changeTrackState(track: HMSTrack, mute: boolean): Promise<any>

changeTrackStateForRoles

  • changeTrackStateForRoles(mute: boolean, type?: HMSTrackType, source?: string, roles?: HMSRole[]): Promise<any>
    • changeTrackStateForRoles is an enhancement on the functionality of changeTrackState.
    • We can change mute status for all the tracks of peers having a particular role.
    • @param source determines the source of the track ex. video, audio etc.
    • The peers affected by this action will get a callback in onChangeTrackStateRequestListener.
    memberof

    HMSSDK

    Parameters

    Returns Promise<any>

destroy

  • destroy(): Promise<any>
    • Calls removeListeners that in turn breaks all connections with native listeners.
    memberof

    HMSSDK

    Returns Promise<any>

disableRTCStats

  • disableRTCStats(): void
    • disable RTCStats sets the same boolean to false that was set true by enableRTCStats. that activates a check which filters out the events acquired in native listeners and don't let them pass through bridge
    • currently available for iOS only.
    memberof

    HMSSDK

    Returns void

enableRTCStats

  • enableRTCStats(): void

endRoom

  • endRoom(reason: string, lock?: boolean): Promise<any>

getAudioDevicesList

  • getAudioDevicesList(): Promise<any>

getAudioMixingMode

  • getAudioMixingMode(): Promise<any>
    • This wrapper function returns the current audio mixing mode, currently available only for android.
    memberof

    HMSSDK

    Returns Promise<any>

    HMSAudioMixingMode

getAudioOutputRouteType

  • getAudioOutputRouteType(): Promise<any>

getRoom

isAudioShared

  • isAudioShared(): Promise<any>

isScreenShared

  • isScreenShared(): Promise<any>

join

leave

  • leave(): Promise<any>

onAudioDeviceChangedListener

  • onAudioDeviceChangedListener(data: { audioDevicesList: string[]; device: string; id: string }): void
  • Parameters

    • data: { audioDevicesList: string[]; device: string; id: string }
      • audioDevicesList: string[]
      • device: string
      • id: string

    Returns void

onChangeTrackStateRequestListener

  • onChangeTrackStateRequestListener(data: any): void

onErrorListener

  • onErrorListener(data: any): void

onJoinListener

  • onJoinListener(data: any): void

onLocalAudioStatsListener

  • onLocalAudioStatsListener(data: any): void

onLocalVideoStatsListener

  • onLocalVideoStatsListener(data: any): void

onMessageListener

  • onMessageListener(data: any): void

onPeerListener

  • onPeerListener(data: any): void

onPreviewListener

  • onPreviewListener(data: any): void
    • Below are all the listeners that are connected to native side.
    • All of the are connected when build function is called, we can connect them to the app by calling addEventListener with corresponding event type.

    • Before passing the data to the eventListener of the app these listeners encode the data in ts classes for a proper structuring of the data.

    • Even When event listeners of the app are disconnected using removeEventListener or removeAllListeners or not even connected in first place, these functions still run to maintain the current state of the instance of HMSSDK.

    Parameters

    • data: any

    Returns void

onRemoteAudioStatsListener

  • onRemoteAudioStatsListener(data: any): void

onRemoteVideoStatsListener

  • onRemoteVideoStatsListener(data: any): void

onRemovedFromRoomListener

  • onRemovedFromRoomListener(data: any): void

onRoleChangeRequestListener

  • onRoleChangeRequestListener(data: any): void

onRoomListener

  • onRoomListener(data: any): void

onSpeakerListener

  • onSpeakerListener(data: any): void

onTrackListener

  • onTrackListener(data: any): void

preview

previewForRole

  • previewForRole(role: HMSRole): Promise<any>
    • previewForRole can be used when there is role change request for current localPeer and we want to show the localPeer how the tracks look before publishing them to room.
    • It requires a role of type HMSRole for which we want to preview the tracks.

    checkout https://www.100ms.live/docs/react-native for more info

    memberof

    HMSSDK

    Parameters

    Returns Promise<any>

reconnectedListener

  • reconnectedListener(data: any): void

reconnectingListener

  • reconnectingListener(data: any): void

remoteMuteAllAudio

  • remoteMuteAllAudio(): Promise<any>
    • This function mutes audio for all peers in the room.
    memberof

    HMSSDK

    Returns Promise<any>

removeAllListeners

  • removeAllListeners(): void

removeEventListener

removeListeners

  • removeListeners(): void
  • Disconnects all the listeners of this sdk from native listeners. Note: this function is only called from destroy function and should only be called when the current instance of HMSSDK is not required anymore.

    memberof

    HMSSDK

    Returns void

removePeer

  • removePeer(peer: HMSPeer, reason: string): Promise<any>

resetVolume

  • resetVolume(): void

sendBroadcastMessage

  • sendBroadcastMessage(message: string, type?: string): Promise<any>

sendDirectMessage

  • sendDirectMessage(message: string, peer: HMSPeer, type?: string): Promise<any>

sendGroupMessage

  • sendGroupMessage(message: string, roles: HMSRole[], type?: string): Promise<any>

setAudioDeviceChangeListener

  • setAudioDeviceChangeListener(callback: Function): any

setAudioMixingMode

setAudioMode

setLogger

setPlaybackForAllAudio

  • setPlaybackForAllAudio(mute: boolean): void

setVolume

  • setVolume(track: HMSTrack, volume: number): void

startAudioshare

startHLSStreaming

startRTMPOrRecording

startScreenshare

  • startScreenshare(): Promise<any>

stopAudioshare

  • stopAudioshare(): Promise<any>

stopHLSStreaming

  • stopHLSStreaming(): Promise<any>

stopRtmpAndRecording

  • stopRtmpAndRecording(): Promise<any>

stopScreenshare

  • stopScreenshare(): Promise<any>

switchAudioOutput

Static build

  • build(__namedParameters: { appGroup?: String; preferredExtension?: String; trackSettings?: HMSTrackSettings }): Promise<default>
    • Returns an instance of HMSSDK
    • This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.
    static
    memberof

    HMSSDK

    Parameters

    • __namedParameters: { appGroup?: String; preferredExtension?: String; trackSettings?: HMSTrackSettings }
      • Optional appGroup?: String
      • Optional preferredExtension?: String
      • Optional trackSettings?: HMSTrackSettings

    Returns Promise<default>

Static getLogger

    • Returns the instance of logger which can be used to manipulate log levels.
    memberof

    HMSSDK

    Returns undefined | HMSLogger

    @instance HMSLogger

Generated using TypeDoc