PICO Unreal Platform SDK
|
Functions | |
static void | PicoRtcGetToken (UObject *WorldContextObject, const FString &UserId, const FString &RoomId, int Ttl, int InValue, FOnlineManagerRtcGetTokenDelegate InRtcGetTokenDelegate) |
Gets the RTC token. More... | |
static ERtcEngineInitResult | PicoGetRtcEngineInit (UObject *WorldContextObject) |
Initializes the RTC engine. More... | |
static int | PicoRtcJoinRoom (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, const FString &Token, const FString &UserExtra, ERtcRoomProfileType InRoomProfileType, bool bIsAutoSubscribeAudio) |
Joins a user to a RTC room. More... | |
static int | RtcDestroyRoom (UObject *WorldContextObject, const FString &RoomId) |
Destroys a room. More... | |
static void | RtcEnableAudioPropertiesReport (UObject *WorldContextObject, int Interval) |
Enables audio properties report. When this switch is turned on, you will regularly receive a statistical report of audio data. More... | |
static int | RtcLeaveRoom (UObject *WorldContextObject, const FString &RoomId) |
Leaves a RTC room. More... | |
static void | RtcMuteLocalAudio (UObject *WorldContextObject, ERtcMuteState InRtcMuteState) |
Mutes local audio to make a user's voice cannot be heard by other users in the same room. More... | |
static void | RtcPublishRoom (UObject *WorldContextObject, const FString &RoomId) |
Publishes local audio stream to a room so that the voice can be heard by other users in the same room. More... | |
static void | RtcUnPublishRoom (UObject *WorldContextObject, const FString &RoomId) |
Stops publishing local audio stream to a room so that other users in the same room cannot hear the voice. More... | |
static void | RtcRoomPauseAllSubscribedStream (UObject *WorldContextObject, const FString &RoomId, ERtcPauseResumeMediaType InPauseResumeMediaType) |
Pauses all subscribed streams of a room. Once paused, the voice of users in the room is blocked so nothing can be heard from this room. More... | |
static void | RtcRoomResumeAllSubscribedStream (UObject *WorldContextObject, const FString &RoomId, ERtcPauseResumeMediaType InPauseResumeMediaType) |
Resumes all subscribed streams of a room. Once resumed, the voice of users in the room can be heard again. More... | |
static void | RtcSetAudioPlaybackDevice (UObject *WorldContextObject, ERtcAudioPlaybackDevice InRtcAudioPlaybackDevice) |
Sets the type of audio playback device. More... | |
static void | RtcSetAudioScenario (UObject *WorldContextObject, ERtcAudioScenarioType InRtcAudioScenarioType) |
Sets audio scenario type. More... | |
static void | RtcSetCaptureVolume (UObject *WorldContextObject, ERtcStreamIndex InRtcStreamIndex, int InVolume) |
Sets volume for audio capturing. More... | |
static void | RtcSetEarMonitorMode (UObject *WorldContextObject, ERtcEarMonitorMode InRtcEarMonitorMode) |
Sets the in-ear monitoring mode. More... | |
static void | RtcSetEarMonitorVolume (UObject *WorldContextObject, int InVolume) |
Sets the volume for in-ear monitoring. More... | |
static void | RtcSetPlaybackVolume (UObject *WorldContextObject, int InVolume) |
Sets the playback volume. More... | |
static void | RtcStartAudioCapture (UObject *WorldContextObject) |
Starts audio capturing. More... | |
static void | RtcStopAudioCapture (UObject *WorldContextObject) |
Stops audio capturing. More... | |
static void | RtcUpdateToken (UObject *WorldContextObject, const FString &RoomId, const FString &Token) |
Updates room token. More... | |
static int32 | RtcSendStreamSyncInfo (UObject *WorldContextObject, int32 Info, ERtcStreamIndex InStreamIndex, int32 RepeatCount, ERtcSyncInfoStreamType InSyncInfoStreamType) |
Sends stream sync info. The sync info data will be sent in the same packet with the audio data. Users who subscribe to this audio stream will receive the stream sync info message. More... | |
static void | RtcRoomPublishStream (UObject *WorldContextObject, const FString &RoomId, ERtcMediaStreamType InRtcMediaStreamType) |
Publishes the local audio stream to a room so that the local user's voice can be heard by other users in the same room. More... | |
static void | RtcRoomSetRemoteAudioPlaybackVolume (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, int32 Volume) |
Sets the volume for a remote user in a room. More... | |
static void | RtcRoomSubscribeStream (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, ERtcMediaStreamType InRtcMediaStreamType) |
Subscribes to the audio stream of a specific user in a room. More... | |
static void | RtcRoomUnPublishStream (UObject *WorldContextObject, const FString &RoomId, ERtcMediaStreamType InRtcMediaStreamType) |
Stops publishing the local audio stream to a room, so that the other in-room users cannot hear the local user's voice. More... | |
static void | RtcRoomUnsubscribeStream (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, ERtcMediaStreamType InRtcMediaStreamType) |
Unsubscribes from the audio stream of a specific user in a room. More... | |
static int64 | RtcSendRoomBinaryMessage (UObject *WorldContextObject, const FString &RoomId, const FString &MessageInfo) |
Sends a binary message to a room. All in-room users will receive this message. More... | |
static int64 | RtcSendRoomMessage (UObject *WorldContextObject, const FString &RoomId, const FString &Message) |
Sends a text message to a room. All in-room users will receive this message. More... | |
static int64 | RtcSendUserBinaryMessage (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, const FString &MessageInfo) |
Sends a binary message to a user. Only the user can receive this message. More... | |
static int64 | RtcSendUserMessage (UObject *WorldContextObject, const FString &RoomId, const FString &UserId, const FString &Message) |
Sends a text message to a user. Only the user can receive this message. More... | |
This is the BP_RTC group
|
static |
Initializes the RTC engine.
WorldContextObject | Used to get the information about the current world. |
|
static |
Gets the RTC token.
WorldContextObject | Used to get the information about the current world. |
UserId | User ID. |
RoomId | Room ID. |
Ttl | The effective duration of the room (in seconds). |
InValue | Channel effective time (in seconds). |
InRtcGetTokenDelegate | Callback function proxy. |
|
static |
Joins a user to a RTC room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
UserId | User ID. |
Token | Room token. |
UserExtra | Extra information added by the user. |
InRoomProfileType | Room type:
|
bIsAutoSubscribeAudio | Whether to automatically subscribe to the audio of the room:
|
0
: success
|
static |
Destroys a room.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room to destroy. |
0
: success
|
static |
Enables audio properties report. When this switch is turned on, you will regularly receive a statistical report of audio data.
WorldContextObject | Used to get the information about the current world. |
Interval | The interval (in milliseconds) between one report and the next. You can set this parameter to 0 or any negative integer to stop receiving audio properties report. For any integer between (0, 100), the SDK will regard it as invalid and automatically set this parameter to 100 ; Any integer equals to or greater than 100 is valid. |
|
static |
Leaves a RTC room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
0
: success
|
static |
Mutes local audio to make a user's voice cannot be heard by other users in the same room.
WorldContextObject | Used to get the information about the current world. |
InRtcMuteState | The state of local audio:
|
|
static |
Publishes local audio stream to a room so that the voice can be heard by other users in the same room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
|
static |
Pauses all subscribed streams of a room. Once paused, the voice of users in the room is blocked so nothing can be heard from this room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
InPauseResumeMediaType | Media type. |
|
static |
Publishes the local audio stream to a room so that the local user's voice can be heard by other users in the same room.
UnPublishRoom(oldRoomId)
should be called first to stop publishing the local audio stream to the current room and then Publish(newRoomId)
should be called. WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room that the local audio stream is published to. |
InRtcMediaStreamType | The media stream type:
|
|
static |
Resumes all subscribed streams of a room. Once resumed, the voice of users in the room can be heard again.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room to resume subscribed streams for. |
InPauseResumeMediaType | Media type. |
|
static |
Sets the volume for a remote user in a room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
UserId | The ID of the remote user. |
Volume | The volume to set for the remote user, which ranges from 0 to 400 . 100 indicates the default volume. |
|
static |
Subscribes to the audio stream of a specific user in a room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
UserId | The ID of the user in the room. |
InRtcMediaStreamType | The media stream type:
|
|
static |
Stops publishing the local audio stream to a room, so that the other in-room users cannot hear the local user's voice.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room to stop publishing the local audio stream to. |
InRtcMediaStreamType | The media stream type:
|
|
static |
Unsubscribes from the audio stream of a specific user in a room.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
UserId | The ID of the user in the room. |
InRtcMediaStreamType | The media stream type:
|
|
static |
Sends a binary message to a room. All in-room users will receive this message.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room to which the binary message is to be sent. |
MessageInfo | The binary message to be sent. |
|
static |
Sends a text message to a room. All in-room users will receive this message.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room to which the text message is to be sent. |
Message | The message to be sent. |
|
static |
Sends stream sync info. The sync info data will be sent in the same packet with the audio data. Users who subscribe to this audio stream will receive the stream sync info message.
WorldContextObject | Used to get the information about the current world. |
Info | The stream sync info. |
InStreamIndex | The Stream index:
|
RepeatCount | The stream sync info will be sent repeatedly for the times set in repeatCount . It's designed to avoid losing package and to ensure that the sync info can be sent successfully. However, if repeatCount is too large, it will cause the sync info to pile up in the queue. It is recommended to set this parameter to 1 . |
InSyncInfoStreamType | The sync info stream type:
|
0
indicates success, and other codes indicate failure. Code | Description |
---|---|
>=0 | Send successfully. Indicates the times sent successfully. |
-1 | Send Failed. Message length exceeded 255B. |
-2 | Send Failed. The data is empty. |
-3 | Send Failed. Send sync info with a un-publish screen stream. |
-4 | Send Failed. Send sync info with a un-publish audio stream. |
|
static |
Sends a binary message to a user. Only the user can receive this message.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room the user is in. |
UserId | The ID of the user the message is sent to. |
MessageInfo | The message to be sent. |
|
static |
Sends a text message to a user. Only the user can receive this message.
WorldContextObject | Used to get the information about the current world. |
RoomId | The ID of the room the user is in. |
UserId | The ID of the user the message is sent to. |
Message | The message to be sent. |
|
static |
Sets the type of audio playback device.
WorldContextObject | Used to get the information about the current world. |
InRtcAudioPlaybackDevice | Device type. |
|
static |
Sets audio scenario type.
WorldContextObject | Used to get the information about the current world. |
InRtcAudioScenarioType | Audio scenario type:
|
|
static |
Sets volume for audio capturing.
WorldContextObject | Used to get the information about the current world. |
InRtcStreamIndex | Stream index main/screen. |
InVolume | The volume. The valid value ranges from 0 to 400 . 100 indicates keeping the original volume. |
|
static |
Sets the in-ear monitoring mode.
WorldContextObject | Used to get the information about the current world. |
InRtcEarMonitorMode | The state of in-ear monitoring mode:
|
|
static |
Sets the volume for in-ear monitoring.
WorldContextObject | Used to get the information about the current world. |
InVolume | The volume. The valid value ranges from 0 to 400 . 100 indicates keeping the original volume. |
|
static |
Sets the playback volume.
WorldContextObject | Used to get the information about the current world. |
InVolume | The volume. The valid value ranges from 0 to 400 . 100 indicates keeping the original volume. |
|
static |
Starts audio capturing.
WorldContextObject | Used to get the information about the current world. |
|
static |
Stops audio capturing.
WorldContextObject | Used to get the information about the current world. |
|
static |
Stops publishing local audio stream to a room so that other users in the same room cannot hear the voice.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
|
static |
Updates room token.
WorldContextObject | Used to get the information about the current world. |
RoomId | Room ID. |
Token | The new token. |