Hierarchy

  • HMSSDK

Properties

Accessors

Methods

RTCStatsListener acceptRoleChange addEventListener cancelPreview changeMetadata changeName changeRole changeRoleOfPeer changeRoleOfPeersWithRoles changeTrackState changeTrackStateForRoles destroy disableNetworkQualityUpdates enableNetworkQualityUpdates endRoom enterPipMode getAudioDevicesList getAudioMixingMode getAudioOutputRouteType getAuthTokenByRoomCode getLocalPeer getPeerFromPeerId getPeerListIterator getRemoteAudioTrackFromTrackId getRemotePeers getRemoteVideoTrackFromTrackId getRoles getRoom isAudioShared isPipModeSupported isScreenShared join leave lowerLocalPeerHand lowerRemotePeerHand onAudioDeviceChangedListener onChangeTrackStateRequestListener onErrorListener onJoinListener onLocalAudioStatsListener onLocalVideoStatsListener onMessageListener onPIPModeChangedListener onPIPRoomLeaveListener onPeerListUpdatedListener onPeerListener onPreviewListener onRemoteAudioStatsListener onRemoteVideoStatsListener onRemovedFromRoomListener onRoleChangeRequestListener onRoomListener onSessionStoreAvailableListener onSpeakerListener onTrackListener preview previewForRole raiseLocalPeerHand reconnectedListener reconnectingListener remoteMuteAllAudio removeAllListeners removeEventListener removePeer roomLeaveCleanup sendBroadcastMessage sendDirectMessage sendGroupMessage sendHLSTimedMetadata setAlwaysScreenOn setAudioDeviceChangeListener setAudioMixingMode setAudioMode setLogger setPipParams setPlaybackForAllAudio setVolume startAudioshare startHLSStreaming startRTMPOrRecording startScreenshare stopAudioshare stopHLSStreaming stopRtmpAndRecording stopScreenshare switchAudioOutput switchAudioOutputUsingIOSUI build getLogger

Properties

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.
  • Auto Simulcast to automatically select the best Streaming Quality of track if feature is enabled in Room.

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

Param

Memberof

HMSSDK

id: string

Accessors

Methods

    • 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

    Parameters

    • metadata: string

    Returns Promise<any>

    Memberof

    HMSSDK

  • Parameters

    Returns Promise<any>

    Deprecated

    This function has been deprecated in favor of #Function changeRoleOfPeer

    • 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

    • 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

    Parameters

    Returns Promise<any>

    Memberof

    HMSSDK

    • This function can be used in a situation when we want to change role of multiple peers by specifying their roles. Hence manipulate their access and rights in the current room. It takes the list of roles HMSRole whom role we want to change and role HMSRole which will be the new role for peers.

    • Note that role will be updated without asking the peers. Meaning, Peers will not get the roleChangeRequest in roleChangeRequest listener.

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

    Parameters

    Returns Promise<any>

    Memberof

    HMSSDK

    • changeTrackStateForRoles is an enhancement on the functionality of changeTrackState.
    • We can change mute status for all the tracks of peers having a particular role.

    Parameters

    • mute: boolean
    • Optional type: HMSTrackType
    • Optional source: string

      determines the source of the track ex. video, audio etc.

      • The peers affected by this action will get a callback in onChangeTrackStateRequestListener.
    • Optional roles: HMSRole[]

    Returns Promise<any>

    Memberof

    HMSSDK

    • Calls removeListeners that in turn breaks all connections with native listeners.

    Returns Promise<any>

    Memberof

    HMSSDK

    • This wrapper function returns the current audio mixing mode, currently available only for android.

    Returns Promise<any>

    HMSAudioMixingMode

    Memberof

    HMSSDK

  • getPeerListIterator method returns an instance of HMSPeerListIterator class

    Parameters

    • Optional options: HMSPeerListIteratorOptions

      options for configuring iterator

    Returns HMSPeerListIterator

    instance of HMSPeerListIterator class

    Example usage:

    const peerListIterator =  hmsInstance.getPeerListIterator();
    

    OR

    const peerListIterator =  hmsInstance.getPeerListIterator({
    limit: 10,
    byRoleName: 'viewer-realtime',
    });
    • getRoles is a wrapper function on an existing native function also known as getRoles the returns array of all present roles which is of type HMSRole

    Returns Promise<HMSRole[]>

    Promise<HMSRole[]>

    Memberof

    HMSSDK

    • This function is used to lower hand for the local peer

    Returns Promise<any>

    Memberof

    HMSSDK

    • This function is used to lower hand for the remote peer

    Parameters

    Returns Promise<any>

  • Parameters

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

    Returns void

  • Parameters

    • data: {
          isInPictureInPictureMode: boolean;
      }
      • isInPictureInPictureMode: boolean

    Returns void

  • Parameters

    • data: {
          id: string;
      }
      • id: string

    Returns 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

  • Parameters

    • data: {
          id: string;
      }
      • id: string

    Returns void

    • This function is used to raise hand for the local peer

    Returns Promise<any>

    Memberof

    HMSSDK

    • This function mutes audio for all peers in the room.

    Returns Promise<any>

    Memberof

    HMSSDK

    • This function sends message to all the peers in the room, the get the message in onMessage listener.

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

    Parameters

    • message: string

      the message that is to be sent

    • type: string = 'chat'

      the default type is set to CHAT. You can pass a custom type here for sending events like Emoji Reactions, Notifications, etc

    Returns Promise<{
        messageId: undefined | string;
    }>

    Memberof

    HMSSDK

    • sendDirectMessage sends a private message to a single peer, only that peer will get the message in onMessage Listener.

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

    Parameters

    • message: string
    • peer: HMSPeer
    • type: string = 'chat'

    Returns Promise<{
        messageId: undefined | string;
    }>

    Memberof

    HMSSDK

    • sendGroupMessage sends a message to specific set of roles, whoever has any of those role in room will get the message in onMessage listener.

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

    Parameters

    • message: string
    • roles: HMSRole[]
    • type: string = 'chat'

    Returns Promise<{
        messageId: undefined | string;
    }>

    Memberof

    HMSSDK

  • send timed metadata for HLS player

    Parameters

    • metadata: HMSHLSTimedMetadata[]

      list of HMSHLSTimedMetadata to be sent

    Returns Promise<boolean>

    Promise

    • This function allows the user to set the screen on always.
    • This is useful when the user wants to keep the screen on while the app is in the foreground.

    Parameters

    • enabled: boolean

      boolean value to enable or disable the always screen on

    Returns Promise<any>

    • Updates the logger for this instance of HMSSDK

    Parameters

    Returns void

    Memberof

    HMSSDK

    • Returns an instance of [HMSSDK] HMSSDK
    • This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.

    Regular Usage:

    const hmsInstance = await HMSSDK.build();

    For Advanced Use-Cases:

    Parameters

    • Optional params: {
          appGroup?: String;
          isPrebuilt?: boolean;
          logSettings?: HMSLogSettings;
          preferredExtension?: String;
          trackSettings?: HMSTrackSettings;
      }
      • Optional appGroup?: String
      • Optional isPrebuilt?: boolean
      • Optional logSettings?: HMSLogSettings
      • Optional preferredExtension?: String
      • Optional trackSettings?: HMSTrackSettings

    Returns Promise<HMSSDK>

    Static

    Memberof

    HMSSDK

Generated using TypeDoc