Class EOS_RTC_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
- Since:
- 11/1/2023
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNotifyDisconnected(EOS_RTC_AddNotifyDisconnectedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnDisconnectedCallback completionDelegate) Register to receive notifications when disconnected from the room.addNotifyParticipantStatusChanged(EOS_RTC_AddNotifyParticipantStatusChangedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnParticipantStatusChangedCallback completionDelegate) Register to receive notifications when a participant's status changes (e.g: join or leave the room), or when the participant is added or removed from an applicable block list (e.g: Epic block list and/or current platform's block list).addNotifyRoomStatisticsUpdated(EOS_RTC_AddNotifyRoomStatisticsUpdatedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnRoomStatisticsUpdatedCallback statisticsUpdateHandler) Register to receive notifications to receiving periodical statistics update.voidblockParticipant(EOS_RTC_BlockParticipantOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnBlockParticipantCallback completionDelegate) Use this function to block a participant already connected to the room.Get a handle to the Audio interfacevoidjoinRoom(EOS_RTC_JoinRoomOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnJoinRoomCallback completionDelegate) Use this function to join a room.voidleaveRoom(EOS_RTC_LeaveRoomOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnLeaveRoomCallback completionDelegate) Use this function to leave a room and clean up all the resources associated with it.voidremoveNotifyDisconnected(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving room disconnection notificationsvoidremoveNotifyParticipantStatusChanged(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving participant status change notificationsvoidremoveNotifyRoomStatisticsUpdated(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving periodical statistics update notificationsUse this function to control settings for the specific room.setSetting(EOS_RTC_SetSettingOptions options) Use this function to control settings.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_RTC_Interface
public EOS_RTC_Interface(com.sun.jna.Pointer address) -
EOS_RTC_Interface
public EOS_RTC_Interface()
-
-
Method Details
-
getAudioInterface
Get a handle to the Audio interface- Returns:
- EOS_RTC_InterfaceAudio handle
-
joinRoom
public void joinRoom(EOS_RTC_JoinRoomOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnJoinRoomCallback completionDelegate) Use this function to join a room.This function does not need to called for the Lobby RTC Room system; doing so will return EOS_AccessDenied. The lobby system will automatically join and leave RTC Rooms for all lobbies that have RTC rooms enabled.
- Parameters:
options- structure containing the parameters for the operation.clientData- Arbitrary data that is passed back in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
leaveRoom
public void leaveRoom(EOS_RTC_LeaveRoomOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnLeaveRoomCallback completionDelegate) Use this function to leave a room and clean up all the resources associated with it. This function has to always be called when the room is abandoned even if the user is already disconnected for other reasons.This function does not need to called for the Lobby RTC Room system; doing so will return EOS_AccessDenied. The lobby system will automatically join and leave RTC Rooms for all lobbies that have RTC rooms enabled.
- Parameters:
options- structure containing the parameters for the operation.clientData- Arbitrary data that is passed back in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
blockParticipant
public void blockParticipant(EOS_RTC_BlockParticipantOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnBlockParticipantCallback completionDelegate) Use this function to block a participant already connected to the room. After blocking them no media will be sent or received between that user and the local user. This method can be used after receiving the OnParticipantStatusChanged notification.- Parameters:
options- structure containing the parameters for the operation.clientData- Arbitrary data that is passed back in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
addNotifyDisconnected
public EOS_NotificationId addNotifyDisconnected(EOS_RTC_AddNotifyDisconnectedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnDisconnectedCallback completionDelegate) Register to receive notifications when disconnected from the room. If the returned NotificationId is valid, you must call EOS_RTC_RemoveNotifyDisconnected when you no longer wish to have your CompletionDelegate called.This function will always return EOS_INVALID_NOTIFICATIONID when used with lobby RTC room. To be notified of the connection status of a Lobby-managed RTC room, use the EOS_Lobby_AddNotifyRTCRoomConnectionChanged function instead.
- Parameters:
clientData- Arbitrary data that is passed back in the CompletionDelegatecompletionDelegate- The callback to be fired when a presence change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyDisconnected
Unregister a previously bound notification handler from receiving room disconnection notifications- Parameters:
notificationId- The Notification ID representing the registered callback
-
addNotifyParticipantStatusChanged
public EOS_NotificationId addNotifyParticipantStatusChanged(EOS_RTC_AddNotifyParticipantStatusChangedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnParticipantStatusChangedCallback completionDelegate) Register to receive notifications when a participant's status changes (e.g: join or leave the room), or when the participant is added or removed from an applicable block list (e.g: Epic block list and/or current platform's block list). If the returned NotificationId is valid, you must call EOS_RTC_RemoveNotifyParticipantStatusChanged when you no longer wish to have your CompletionDelegate called.If you register to this notification before joining a room, you will receive a notification for every member already in the room when you join said room. This allows you to know who is already in the room when you join.
To be used effectively with a Lobby-managed RTC room, this should be registered during the EOS_Lobby_CreateLobby or EOS_Lobby_JoinLobby completion callbacks when the ResultCode is EOS_Success. If this notification is registered after that point, it is possible to miss notifications for already-existing room participants.
You can use this notification to detect internal automatic RTC blocks due to block lists. When a participant joins a room and while the system resolves the block list status of said participant, the participant is set to blocked and you'll receive a notification with ParticipantStatus set to EOS_RTCPS_Joined and bParticipantInBlocklist set to true. Once the block list status is resolved, if the player is not in any applicable block list(s), it is then unblocked and a new notification is sent with ParticipantStatus set to EOS_RTCPS_Joined and bParticipantInBlocklist set to false.
- Parameters:
clientData- Arbitrary data that is passed back in the CompletionDelegatecompletionDelegate- The callback to be fired when a presence change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
This notification is also raised when the local user joins the room, but NOT when the local user leaves the room.
- See Also:
-
removeNotifyParticipantStatusChanged
Unregister a previously bound notification handler from receiving participant status change notifications- Parameters:
notificationId- The Notification ID representing the registered callback
-
setSetting
Use this function to control settings.The available settings are documented as part of EOS_RTC_SetSettingOptions.
- Parameters:
options- structure containing the parameters for the operation- Returns:
EOS_EResult.EOS_Successwhen the setting is successfully set
EOS_EResult.EOS_NotFoundwhen the setting is unknown
EOS_EResult.EOS_InvalidParameterswhen the value is invalid.
-
setRoomSetting
Use this function to control settings for the specific room.The available settings are documented as part of EOS_RTC_SetRoomSettingOptions.
- Parameters:
options- structure containing the parameters for the operation- Returns:
EOS_EResult.EOS_Successwhen the setting is successfully set
EOS_EResult.EOS_NotFoundwhen the setting is unknown
EOS_EResult.EOS_InvalidParameterswhen the value is invalid.
-
addNotifyRoomStatisticsUpdated
public EOS_NotificationId addNotifyRoomStatisticsUpdated(EOS_RTC_AddNotifyRoomStatisticsUpdatedOptions options, com.sun.jna.Pointer clientData, EOS_RTC_OnRoomStatisticsUpdatedCallback statisticsUpdateHandler) Register to receive notifications to receiving periodical statistics update. If the returned NotificationId is valid, you must call EOS_RTC_RemoveNotifyRoomStatisticsUpdated when you no longer wish to have your StatisticsUpdateHandler called.- Parameters:
clientData- Arbitrary data that is passed back in the StatisticsUpdateHandlerstatisticsUpdateHandler- The callback to be fired when a statistics updated.- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyRoomStatisticsUpdated
Unregister a previously bound notification handler from receiving periodical statistics update notifications- Parameters:
notificationId- The Notification ID representing the registered callback
-