Class HMSSDK
-
- All Implemented Interfaces:
public final class HMSSDK
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classHMSSDK.Builder
-
Field Summary
Fields Modifier and Type Field Description public final static <Error class: unknown class>WEBRTC_VERSIONpublic final static <Error class: unknown class>VERSIONprivate final HMSTrackSettingshmsSettingsprivate final HMSLogger.LogLevelhmsWebRtcLogLevelprivate final BooleanshouldSkipPIIEventsprivate final ContextapplicationContextprivate final HMSLogSettingshmsLogSettingsprivate final FrameworkInfoframeworkInfoprivate final BooleanhaltPreviewJoinForPermissionsprivate final BooleaniceGatheringOnAnyAddressPorts
-
Method Summary
Modifier and Type Method Description final HMSTrackSettingsgetHmsSettings()final HMSLogger.LogLevelgetHmsWebRtcLogLevel()final BooleangetShouldSkipPIIEvents()final ContextgetApplicationContext()final HMSLogSettingsgetHmsLogSettings()final FrameworkInfogetFrameworkInfo()final BooleangetHaltPreviewJoinForPermissions()final BooleangetIceGatheringOnAnyAddressPorts()final Unitpreview(HMSConfig config, HMSPreviewListener listener)Begin a preview so that the local peer's audio and video can be displayed to them before they join a call. final Unitpreview(HMSRole forRole, RolePreviewListener rolePreviewListener)final UnitcancelPreview()final Unitjoin(HMSConfig config, HMSUpdateListener hmsUpdateListener)Join the call. final Unitleave(HMSActionResultListener hmsActionResultListener)Exit the call. final HMSLocalPeergetLocalPeer()Returns an instance of the local peer if one existed. final List<HMSPeer>getPeers()Returns all peers, remote and local. final List<HMSRemotePeer>getRemotePeers()Returns only remote peers. final UnitsendBroadcastMessage(String message, String type, HMSMessageResultListener hmsMessageResultListener)Sends a message to everyone in the call. final UnitsendDirectMessage(String message, String type, HMSPeer peerTo, HMSMessageResultListener hmsMessageResultListener)Sends a message a particular peer only. final UnitsendGroupMessage(String message, String type, List<HMSRole> hmsRolesTo, HMSMessageResultListener hmsMessageResultListener)Sends a message to the roles defined in hmsRolesTo. final UnitaddAudioObserver(HMSAudioListener observer)final UnitremoveAudioObserver()final List<HMSRole>getRoles()final UnitchangeRoleOfPeersWithRoles(List<HMSRole> ofRoles, HMSRole toRole, HMSActionResultListener hmsActionResultListener)Requests a change of every peer with any role in ofRoles to have their roles changed to the role toRole. final UnitchangeRole(HMSPeer forPeer, HMSRole toRole, Boolean force, HMSActionResultListener hmsActionResultListener)Requests a change of HMSRole to a new role. final UnitchangeRoleOfPeer(HMSPeer forPeer, HMSRole toRole, Boolean force, HMSActionResultListener hmsActionResultListener)Requests a change of HMSRole to a new role. final UnitacceptChangeRole(HMSRoleChangeRequest request, HMSActionResultListener hmsActionResultListener)When a peer is requested to change their role (see changeRole) to accept the new role this has to be called. final UnitremovePeerRequest(HMSRemotePeer peer, String reason, HMSActionResultListener hmsActionResultListener)Removes the given peer from the audio/video conference. final UnitendRoom(String reason, Boolean lock, HMSActionResultListener hmsActionResultListener)End the room and make all participants leave. final UnitchangeTrackState(HMSTrack forRemoteTrack, Boolean mute, HMSActionResultListener hmsActionResultListener)To change the mute status of a single remote HMSTrack. final UnitchangeTrackState(Boolean mute, HMSTrackType type, String source, List<HMSRole> roles, HMSActionResultListener hmsActionResultListener)To change the mute status of one or many remote HMSTrack for all peers of a particular role, or all tracks of a particular source, type or source AND type. final UnitstartRtmpOrRecording(HMSRecordingConfig config, HMSActionResultListener hmsActionResultListener)Starts rtmp streaming or recording on the parameters described in config. final UnitstartHLSStreaming(HMSHLSConfig config, HMSActionResultListener hmsActionResultListener)Starts HLS streaming on the parameters described in config. final UnitstopHLSStreaming(HMSHLSConfig config, HMSActionResultListener hmsActionResultListener)Stop HLS streaming on the parameters described in config. final UnitstopRtmpAndRecording(HMSActionResultListener hmsActionResultListener)Stops a previously started rtmp recording or stream. final HMSRoomgetRoom()Returns a HMSRoom object if one is currently active. final UnitstartScreenshare(HMSActionResultListener hmsActionResultListener, Intent mediaProjectionPermissionResultData, Notification screenShareNotification)Start screen sharing from your android device. final BooleanisScreenShared()A method to check if the screen share is currently active on device final UnitstopScreenshare(HMSActionResultListener hmsActionResultListener)Stops screen share. final UnitstartAudioshare(HMSActionResultListener hmsActionResultListener, Intent mediaProjectionPermissionResultData, AudioMixingMode audioMixingMode, Notification audioShareNotification)Starts audio share of your android device. final UnitsetAudioMixingMode(AudioMixingMode audioMixingMode)Sets the mode in which audio mixing needs to be done after capturing the audio from system final UnitstopAudioshare(HMSActionResultListener hmsActionResultListener)Stop audio sharing. final UnitstreamAndPlayAudioFromRawFile(@RawRes() Integer audioResourceId, HMSActionResultListener hmsActionResultListener)final UnitstopAudioFromRawFile(HMSActionResultListener hmsActionResultListener)final UnitaddPlugin(HMSVideoPlugin plugin, HMSActionResultListener hmsActionResultListener, Integer pluginFrameRate)Initializes video pre-processors such as Virtual Background and blur. final UnitremovePlugin(HMSVideoPlugin plugin, HMSActionResultListener hmsActionResultListener)Removes a plugin and clears its effects. final List<HMSVideoPlugin>getPlugins()Gets the list of active plugins. final UnitchangeName(String name, HMSActionResultListener hmsActionResultListener)Change the name that appears inside HMSPeer.name This change is persistent and all peers joining after the change will still see these values. final UnitchangeMetadata(String metadata, HMSActionResultListener hmsActionResultListener)Change the metadata that appears inside HMSPeer.metadata. final UnitraiseLocalPeerHand(HMSActionResultListener actionlistener)API to raise local peer's hand final UnitlowerLocalPeerHand(HMSActionResultListener actionlistener)Lower local peer's hand. final UnitlowerRemotePeerHand(HMSPeer forPeer, HMSActionResultListener actionlistener)Lowers a remote peer's hand. final PeerListIteratorgetPeerListIterator(PeerListIteratorOptions peerListIteratorOptions)final UnitsetAudioMode(Integer audioMode)Change Audio Mode manually. final UnitswitchAudioOutput(HMSAudioManager.AudioDevice audioDevice)Switch the device through which audio output should be sent. final UnitsetAudioDeviceChangeListener(HMSAudioManager.AudioManagerDeviceChangeListener audioManageDeviceChangeDeviceChangeListener)Set a listener to receive updates whenever audio changes. final HMSAudioManager.AudioDevicegetAudioOutputRouteType()get current device type through which audio output is being routed. final List<HMSAudioManager.AudioDevice>getAudioDevicesList()get current available list of devices type through which audio output can be routed. final List<HMSAudioDeviceInfo>getAudioDevicesInfoList()final UnitaddRtcStatsObserver(HMSStatsObserver observer)Network quality will begin to be measured and sent into the observer until the call ends. final UnitremoveRtcStatsObserver()final UnitsetHlsSessionMetadata(List<HMSHLSTimedMetadata> metadata, HMSActionResultListener hmsActionResultListener)Sets the hls-session metadata. final UnitsendErrorEvent(HMSException hmsException)Sends the hls error event to analytics. final UnitgetAuthTokenByRoomCode(TokenRequest tokenRequest, TokenRequestOptions tokenRequestOptions, HMSTokenListener hmsTokenListener)Fetch room token by shortcode. final HMSWhiteboardPermissionsgetWhiteboardPermissions()final HmsInteractivityCentergetHmsInteractivityCenter()final UnitsetPermissionsAccepted()Does not check to see if permissions are really granted. final UnitgetRoomLayout(String authToken, LayoutRequestOptions layoutRequestOptions, HMSLayoutListener layoutListener)Fetch layout config by token. final UnitsetNoiseCancellationEnabled(Boolean enable)final UnitenableNoiseCancellation(Boolean enable, HMSActionResultListener hmsActionResultListener)Turns noise cancellation on or off dynamically. final BooleangetNoiseCancellationEnabled()final BooleanisNoiseCancellationEnabled()Returns whether noise cancellation is currently enabled. final UnitstartRealTimeTranscription(TranscriptionsMode mode, HMSActionResultListener listener)Starts real time transcription for all peers in the room. final UnitstopRealTimeTranscription(TranscriptionsMode mode, HMSActionResultListener listener)Stops real time transcription for all peers in the room. final AvailabilityStatusisNoiseCancellationAvailable()final AvailabilityStatusisNoiseCancellationSupported()Whether noise cancellation is available. final HMSPeergetPeerById(String peerId)final HMSDiagnosticsgetDiagnosticsSDK(String customerUserId)final UnitsearchPeerNameInLargeRoom(String query, Integer limit, Long offset, HmsTypedActionResultListener<PeerSearchResponse> listener)Only in a large room, search for a peer's name. -
-
Method Detail
-
getHmsSettings
final HMSTrackSettings getHmsSettings()
-
getHmsWebRtcLogLevel
final HMSLogger.LogLevel getHmsWebRtcLogLevel()
-
getShouldSkipPIIEvents
final Boolean getShouldSkipPIIEvents()
-
getApplicationContext
final Context getApplicationContext()
-
getHmsLogSettings
final HMSLogSettings getHmsLogSettings()
-
getFrameworkInfo
final FrameworkInfo getFrameworkInfo()
-
getHaltPreviewJoinForPermissions
final Boolean getHaltPreviewJoinForPermissions()
-
getIceGatheringOnAnyAddressPorts
final Boolean getIceGatheringOnAnyAddressPorts()
-
preview
final Unit preview(HMSConfig config, HMSPreviewListener listener)
Begin a preview so that the local peer's audio and video can be displayed to them before they join a call.
- Parameters:
config- the details of the call they want to join.listener- information on the room and the peer's own audio and video tracks will be sent here.
-
preview
final Unit preview(HMSRole forRole, RolePreviewListener rolePreviewListener)
-
cancelPreview
final Unit cancelPreview()
-
join
final Unit join(HMSConfig config, HMSUpdateListener hmsUpdateListener)
Join the call.
- Parameters:
config- the HMSConfig which defines.
-
leave
final Unit leave(HMSActionResultListener hmsActionResultListener)
Exit the call.
-
getLocalPeer
final HMSLocalPeer getLocalPeer()
Returns an instance of the local peer if one existed. A local peer only exists during a preview and an active call.
-
getRemotePeers
final List<HMSRemotePeer> getRemotePeers()
Returns only remote peers. The peer's own instance will not be included in this. To get all peers including the local one consider getPeers or for only the local one consider getLocalPeer.
-
sendBroadcastMessage
final Unit sendBroadcastMessage(String message, String type, HMSMessageResultListener hmsMessageResultListener)
Sends a message to everyone in the call.
- Parameters:
message- content of the message.type- the type of message can be of HMSMessageType or others as you define them.hmsMessageResultListener- informs about whether the message was successfully sent, or the kind of error if not.
-
sendDirectMessage
final Unit sendDirectMessage(String message, String type, HMSPeer peerTo, HMSMessageResultListener hmsMessageResultListener)
Sends a message a particular peer only. The one specified in peerTo.
- Parameters:
message- content of the message.type- the type of message can be of HMSMessageType or others as you define them.peerTo- the HMSPeer to whom this message is directed.hmsMessageResultListener- informs about whether the message was successfully sent, or the kind of error if not.
-
sendGroupMessage
final Unit sendGroupMessage(String message, String type, List<HMSRole> hmsRolesTo, HMSMessageResultListener hmsMessageResultListener)
Sends a message to the roles defined in hmsRolesTo. All peers currently with that role will receive the message.
- Parameters:
message- content of the message.type- the type of message can be of HMSMessageType or others as you define them.hmsRolesTo- the list of roles to whom this message is directed.hmsMessageResultListener- informs about whether the message was successfully sent, or the kind of error if not.
-
addAudioObserver
final Unit addAudioObserver(HMSAudioListener observer)
-
removeAudioObserver
final Unit removeAudioObserver()
-
changeRoleOfPeersWithRoles
final Unit changeRoleOfPeersWithRoles(List<HMSRole> ofRoles, HMSRole toRole, HMSActionResultListener hmsActionResultListener)
Requests a change of every peer with any role in ofRoles to have their roles changed to the role toRole.
- Parameters:
ofRoles- The list of roles for which all peers roles should be changed.toRole- The role they should have after the change.hmsActionResultListener- Listener that will return HMSActionResultListener.onSuccess if the role change request is successful else will call HMSActionResultListener.onError with the error received from server
-
changeRole
@Deprecated(message = "Method is renamed to changeRoleOfPeer", replaceWith = @ReplaceWith(imports = {}, expression = "changeRoleOfPeer(forPeer, toRole, force, hmsActionResultListener)")) final Unit changeRole(HMSPeer forPeer, HMSRole toRole, Boolean force, HMSActionResultListener hmsActionResultListener)
Requests a change of HMSRole to a new role.
- Parameters:
forPeer- The HMSPeer whose role should be requested to be changed.toRole- the new role the HMSPeer would have if they accept or are forced to change to.force- false if the peer should be requested to accept the new roles (they can choose to deny).hmsActionResultListener- Listener that will return HMSActionResultListener.onSuccess if the role change request is successful else will call HMSActionResultListener.onError with the error received from server
-
changeRoleOfPeer
final Unit changeRoleOfPeer(HMSPeer forPeer, HMSRole toRole, Boolean force, HMSActionResultListener hmsActionResultListener)
Requests a change of HMSRole to a new role.
- Parameters:
forPeer- The HMSPeer whose role should be requested to be changed.toRole- the new role the HMSPeer would have if they accept or are forced to change to.force- false if the peer should be requested to accept the new roles (they can choose to deny).hmsActionResultListener- Listener that will return HMSActionResultListener.onSuccess if the role change request is successful else will call HMSActionResultListener.onError with the error received from server
-
acceptChangeRole
final Unit acceptChangeRole(HMSRoleChangeRequest request, HMSActionResultListener hmsActionResultListener)
When a peer is requested to change their role (see changeRole) to accept the new role this has to be called. Once this method is called, the peer's role will be changed to the requested one.
- Parameters:
request- the HMSRoleChangeRequest that the SDK had sent to this peer (in HMSUpdateListener.onRoleChangeRequest) to inform them that a role change was requested.hmsActionResultListener- Listener that will return HMSActionResultListener.onSuccess if the role change request is successful else will call HMSActionResultListener.onError with the error received from server
-
removePeerRequest
final Unit removePeerRequest(HMSRemotePeer peer, String reason, HMSActionResultListener hmsActionResultListener)
Removes the given peer from the audio/video conference.
- Parameters:
reason- will be shown to them.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure
-
endRoom
final Unit endRoom(String reason, Boolean lock, HMSActionResultListener hmsActionResultListener)
End the room and make all participants leave.
- Parameters:
reason- The reason why the room is being locked.lock- Whether rejoining the room should be disabled for the foreseeable future.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure
-
changeTrackState
final Unit changeTrackState(HMSTrack forRemoteTrack, Boolean mute, HMSActionResultListener hmsActionResultListener)
To change the mute status of a single remote HMSTrack.
- Parameters:
forRemoteTrack- the HMSTrack whose mute status needs to be changed.mute- true if the track needs to be muted, false otherwise.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
changeTrackState
final Unit changeTrackState(Boolean mute, HMSTrackType type, String source, List<HMSRole> roles, HMSActionResultListener hmsActionResultListener)
To change the mute status of one or many remote HMSTrack for all peers of a particular role, or all tracks of a particular source, type or source AND type.
- Parameters:
mute- true if the track needs to be muted, false otherwisetype- optional, the HMSTrackType which should be affected.source- optional, the HMSTrackSource which should be affected.roles- optional, a list of roles, may have a single item in a list, whose tracks should be affected.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
startRtmpOrRecording
final Unit startRtmpOrRecording(HMSRecordingConfig config, HMSActionResultListener hmsActionResultListener)
Starts rtmp streaming or recording on the parameters described in config.
- Parameters:
config- the HMSRecordingConfig which defines streaming/recording parameters for this start request.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
startHLSStreaming
final Unit startHLSStreaming(HMSHLSConfig config, HMSActionResultListener hmsActionResultListener)
Starts HLS streaming on the parameters described in config.
- Parameters:
config- the HMSHLSConfig which defines streaming/recording parameters for this start request.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
stopHLSStreaming
final Unit stopHLSStreaming(HMSHLSConfig config, HMSActionResultListener hmsActionResultListener)
Stop HLS streaming on the parameters described in config.
- Parameters:
config- optional HMSHLSConfig which defines streaming/recording parameters for this start request.hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
stopRtmpAndRecording
final Unit stopRtmpAndRecording(HMSActionResultListener hmsActionResultListener)
Stops a previously started rtmp recording or stream. See startRtmpOrRecording for starting.
- Parameters:
hmsActionResultListener- the callback that would be called by SDK in case of a success or failure.
-
getRoom
final HMSRoom getRoom()
Returns a HMSRoom object if one is currently active. A room will be present after preview or after join. Will return null if the user is not currently in a preview or a room.
-
startScreenshare
final Unit startScreenshare(HMSActionResultListener hmsActionResultListener, Intent mediaProjectionPermissionResultData, Notification screenShareNotification)
Start screen sharing from your android device.
- Parameters:
hmsActionResultListener- A callback instance on which HMSActionResultListener.onSuccess and HMSActionResultListener.onError will be calledmediaProjectionPermissionResultData- The intent passed by Android OS in onActivityResult callbackscreenShareNotification- a sticky notification to show while screenshare is active.
-
isScreenShared
final Boolean isScreenShared()
A method to check if the screen share is currently active on device
-
stopScreenshare
final Unit stopScreenshare(HMSActionResultListener hmsActionResultListener)
Stops screen share.
- Parameters:
hmsActionResultListener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
startAudioshare
@RequiresApi(value = 29) final Unit startAudioshare(HMSActionResultListener hmsActionResultListener, Intent mediaProjectionPermissionResultData, AudioMixingMode audioMixingMode, Notification audioShareNotification)
Starts audio share of your android device. Only supported on Android 10 and above.
- Parameters:
hmsActionResultListener- A callback instance on which HMSActionResultListener.onSuccess and HMSActionResultListener.onError will be calledmediaProjectionPermissionResultData- The intent passed by Android OS in onActivityResult callbackaudioMixingMode- One out of the modes in AudioMixingMode that is needed while mixing audioaudioShareNotification- a sticky notification to show while audio share is active.
-
setAudioMixingMode
final Unit setAudioMixingMode(AudioMixingMode audioMixingMode)
Sets the mode in which audio mixing needs to be done after capturing the audio from system
-
stopAudioshare
final Unit stopAudioshare(HMSActionResultListener hmsActionResultListener)
Stop audio sharing.
- Parameters:
hmsActionResultListener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
streamAndPlayAudioFromRawFile
final Unit streamAndPlayAudioFromRawFile(@RawRes() Integer audioResourceId, HMSActionResultListener hmsActionResultListener)
-
stopAudioFromRawFile
final Unit stopAudioFromRawFile(HMSActionResultListener hmsActionResultListener)
-
addPlugin
final Unit addPlugin(HMSVideoPlugin plugin, HMSActionResultListener hmsActionResultListener, Integer pluginFrameRate)
Initializes video pre-processors such as Virtual Background and blur.
- Parameters:
plugin- A plugin which got added.hmsActionResultListener- whether it was successful or errored.pluginFrameRate- optional - framerate that the plugin will run at.
-
removePlugin
final Unit removePlugin(HMSVideoPlugin plugin, HMSActionResultListener hmsActionResultListener)
Removes a plugin and clears its effects.
- Parameters:
plugin- A plugin which got added.hmsActionResultListener- whether the operation succeeded or failed.
-
getPlugins
final List<HMSVideoPlugin> getPlugins()
Gets the list of active plugins.
-
changeName
final Unit changeName(String name, HMSActionResultListener hmsActionResultListener)
Change the name that appears inside HMSPeer.name This change is persistent and all peers joining after the change will still see these values.
- Parameters:
name- the name to change HMSPeer.name to.hmsActionResultListener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
changeMetadata
final Unit changeMetadata(String metadata, HMSActionResultListener hmsActionResultListener)
Change the metadata that appears inside HMSPeer.metadata. This change is persistent and all peers joining after the change will still see these values.
- Parameters:
metadata- the name to change HMSPeer.metadata to.hmsActionResultListener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
raiseLocalPeerHand
final Unit raiseLocalPeerHand(HMSActionResultListener actionlistener)
API to raise local peer's hand
- Parameters:
actionlistener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
lowerLocalPeerHand
final Unit lowerLocalPeerHand(HMSActionResultListener actionlistener)
Lower local peer's hand.
- Parameters:
actionlistener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
lowerRemotePeerHand
final Unit lowerRemotePeerHand(HMSPeer forPeer, HMSActionResultListener actionlistener)
Lowers a remote peer's hand. The remote peer will be notified via HMSUpdateListener.onPeerUpdate
- Parameters:
forPeer- The HMSRemotePeer whose hand needs to be loweredactionlistener- A callback whose HMSActionResultListener.onSuccess will be called when the the action completes.
-
getPeerListIterator
final PeerListIterator getPeerListIterator(PeerListIteratorOptions peerListIteratorOptions)
-
setAudioMode
final Unit setAudioMode(Integer audioMode)
Change Audio Mode manually. The most common usecase would be toggle between in-call volume/media volume
-
switchAudioOutput
final Unit switchAudioOutput(HMSAudioManager.AudioDevice audioDevice)
Switch the device through which audio output should be sent.
- Parameters:
audioDevice- the AudioDevice through which audio should be routed.
-
setAudioDeviceChangeListener
final Unit setAudioDeviceChangeListener(HMSAudioManager.AudioManagerDeviceChangeListener audioManageDeviceChangeDeviceChangeListener)
Set a listener to receive updates whenever audio changes.
- Parameters:
audioManageDeviceChangeDeviceChangeListener-listener to be passes to be able to listen to the updates.
-
getAudioOutputRouteType
final HMSAudioManager.AudioDevice getAudioOutputRouteType()
get current device type through which audio output is being routed.
-
getAudioDevicesList
final List<HMSAudioManager.AudioDevice> getAudioDevicesList()
get current available list of devices type through which audio output can be routed.
-
getAudioDevicesInfoList
final List<HMSAudioDeviceInfo> getAudioDevicesInfoList()
-
addRtcStatsObserver
final Unit addRtcStatsObserver(HMSStatsObserver observer)
Network quality will begin to be measured and sent into the observer until the call ends. Only one observer may be active at a time. If multiple observers are added, the previous ones will be unregistered.
-
removeRtcStatsObserver
final Unit removeRtcStatsObserver()
-
setHlsSessionMetadata
final Unit setHlsSessionMetadata(List<HMSHLSTimedMetadata> metadata, HMSActionResultListener hmsActionResultListener)
Sets the hls-session metadata. This information will be sent as a part of stream when streaming the content.
-
sendErrorEvent
final Unit sendErrorEvent(HMSException hmsException)
Sends the hls error event to analytics.
-
getAuthTokenByRoomCode
final Unit getAuthTokenByRoomCode(TokenRequest tokenRequest, TokenRequestOptions tokenRequestOptions, HMSTokenListener hmsTokenListener)
Fetch room token by shortcode.
- Parameters:
tokenRequest- shortcode of a room and optional userIDhmsTokenListener- return token if it was successful, otherwise error
-
getWhiteboardPermissions
final HMSWhiteboardPermissions getWhiteboardPermissions()
-
getHmsInteractivityCenter
final HmsInteractivityCenter getHmsInteractivityCenter()
-
setPermissionsAccepted
final Unit setPermissionsAccepted()
Does not check to see if permissions are really granted. If they aren't granted it will proceed and the tracks for which permissions are missing will be disabled.
-
getRoomLayout
final Unit getRoomLayout(String authToken, LayoutRequestOptions layoutRequestOptions, HMSLayoutListener layoutListener)
Fetch layout config by token.
- Parameters:
authToken- token of a roomlayoutRequestOptions- optional layout endpointlayoutListener- return layout config if it was successful, otherwise error
-
setNoiseCancellationEnabled
@Deprecated(message = "Method is renamed to enableNoiseCancellation. It may fail", replaceWith = @ReplaceWith(imports = {"live.hms.video.sdk.HMSActionResultListener"}, expression = "enableNoiseCancellation(enable, object : HMSActionResultListener{ /*Enable might fail, implement onSuccess/onError */ })"), level = DeprecationLevel.ERROR) final Unit setNoiseCancellationEnabled(Boolean enable)
-
enableNoiseCancellation
final Unit enableNoiseCancellation(Boolean enable, HMSActionResultListener hmsActionResultListener)
Turns noise cancellation on or off dynamically. It only applies when a call is active. No-op if called when no room is joined. To turn on noise cancellation by default look into the property
enableNoiseCancellationof live.hms.video.media.settings.HMSAudioTrackSettings and set it in the builder property while creating an HMSSDK instance. Will not be enabled if isNoiseCancellationAvailable returns anything other than AvailabilityStatus.Available. isNoiseCancellationAvailable will also list the reason why it can't be enabled.- Parameters:
enable- true if requesting to turn on, false if requesting to turn off.hmsActionResultListener- will call onSuccess if the operation succeeded, onError if it failed.
-
getNoiseCancellationEnabled
@Deprecated(message = "Method is renamed to isNoiseCancellationEnabled", replaceWith = @ReplaceWith(imports = {}, expression = "isNoiseCancellationEnabled()"), level = DeprecationLevel.ERROR) final Boolean getNoiseCancellationEnabled()
-
isNoiseCancellationEnabled
final Boolean isNoiseCancellationEnabled()
Returns whether noise cancellation is currently enabled. Will always return false if no room is joined. If this is unexpectedly false, check isNoiseCancellationAvailable.
-
startRealTimeTranscription
final Unit startRealTimeTranscription(TranscriptionsMode mode, HMSActionResultListener listener)
Starts real time transcription for all peers in the room.
-
stopRealTimeTranscription
final Unit stopRealTimeTranscription(TranscriptionsMode mode, HMSActionResultListener listener)
Stops real time transcription for all peers in the room.
-
isNoiseCancellationAvailable
@Deprecated(message = "deprecated method, use isNoiseCancellationSupported", replaceWith = @ReplaceWith(imports = {}, expression = "isNoiseCancellationSupported()"), level = DeprecationLevel.ERROR) final AvailabilityStatus isNoiseCancellationAvailable()
-
isNoiseCancellationSupported
final AvailabilityStatus isNoiseCancellationSupported()
Whether noise cancellation is available. Noise cancellation will not be available if the library is not imported. Look at Docs for details.
-
getPeerById
final HMSPeer getPeerById(String peerId)
Given a peerId, returns the HMSPeer for that peerId.
- Parameters:
peerId- the peerId of the requested HMSPeer.- Returns:
the HMSPeer associated with the peer id. Null if not present.
-
getDiagnosticsSDK
final HMSDiagnostics getDiagnosticsSDK(String customerUserId)
-
searchPeerNameInLargeRoom
final Unit searchPeerNameInLargeRoom(String query, Integer limit, Long offset, HmsTypedActionResultListener<PeerSearchResponse> listener)
Only in a large room, search for a peer's name.
-
-
-
-