Hierarchy

  • HMSSDK

Properties

Methods

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

Methods

    • 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

    Returns void

    Memberof

    HMSSDK

    • 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

  • Parameters

    • Optional data: PIPConfig

    Returns Promise<undefined | boolean>

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

    Returns Promise<any>

    HMSAudioMixingMode

    Memberof

    HMSSDK

    • 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

  • Parameters

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

    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

    • 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]HMSRole for which we want to preview the tracks.

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

    Parameters

    Returns Promise<any>

    Memberof

    HMSSDK

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

    Returns Promise<any>

    Memberof

    HMSSDK

    • Updates the logger for this instance of HMSSDK

    Parameters

    Returns void

    Memberof

    HMSSDK

  • Parameters

    • Optional data: PIPConfig

    Returns Promise<undefined | boolean>

    • 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;
          logSettings?: HMSLogSettings;
          preferredExtension?: String;
          trackSettings?: HMSTrackSettings;
      }

    Returns Promise<HMSSDK>

    Static

    Memberof

    HMSSDK

Generated using TypeDoc