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 one's voice unable to be heard be others in the same room. More...
 
static void RtcPublishRoom (UObject *WorldContextObject, const FString &RoomId)
 Publishes local audio stream to a room, thereby making the voice heard be others in the same room. More...
 
static void RtcUnPublishRoom (UObject *WorldContextObject, const FString &RoomId)
 Stops publishing local audio stream to a room, so others 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 capture. 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 capture. More...
 
static void RtcStopAudioCapture (UObject *WorldContextObject)
 Stops audio capture. More...
 
static void RtcUpdateToken (UObject *WorldContextObject, const FString &RoomId, const FString &Token)
 Updates room token. More...
 

Detailed Description

This is the BP_RTC group

Function Documentation

◆ PicoGetRtcEngineInit()

ERtcEngineInitResult PicoGetRtcEngineInit ( UObject *  WorldContextObject)
static

Initializes the RTC engine.

Parameters
WorldContextObjectUsed to get the information about the current world.
Returns
Voice The initialization result.

◆ PicoRtcGetToken()

void PicoRtcGetToken ( UObject *  WorldContextObject,
const FString &  UserId,
const FString &  RoomId,
int  Ttl,
int  InValue,
FOnlineManagerRtcGetTokenDelegate  InRtcGetTokenDelegate 
)
static

Gets the rtc token.

Parameters
WorldContextObjectUsed to get the information about the current world.
UserIdUser ID.
RoomIdRoom ID.
TtlThe effective duration of the room (in seconds).
InValueChannel effective time (in seconds).
InRtcGetTokenDelegateCallback function proxy.


◆ PicoRtcJoinRoom()

int PicoRtcJoinRoom ( UObject *  WorldContextObject,
const FString &  RoomId,
const FString &  UserId,
const FString &  Token,
const FString &  UserExtra,
ERtcRoomProfileType  InRoomProfileType,
bool  bIsAutoSubscribeAudio 
)
static

Joins a user to a rtc room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.
UserIdUser ID.
TokenRoom token.
UserExtraExtra information added by the user.
InRoomProfileTypeRoom type:
  • 0: communication room
  • 1: live broadcasting room
  • 2: game room
  • 3: cloud game room
  • 4: low-latency room
bIsAutoSubscribeAudioWhether to automatically subscribe to the audio of the room:
  • true: yes
  • false: no
Returns
Int:
  • 0: success
  • Other values: failure

◆ RtcDestroyRoom()

int RtcDestroyRoom ( UObject *  WorldContextObject,
const FString &  RoomId 
)
static

Destroys a room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.
Returns
Int:
  • 0: success
  • Other values: failure


◆ RtcEnableAudioPropertiesReport()

void RtcEnableAudioPropertiesReport ( UObject *  WorldContextObject,
int  Interval 
)
static

Enables audio properties report. When this switch is turned on, you will regularly receive a statistical report of audio data.

Parameters
WorldContextObjectUsed to get the information about the current world.
IntervalThe 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 equal to or greater than 100 is valid.


◆ RtcLeaveRoom()

int RtcLeaveRoom ( UObject *  WorldContextObject,
const FString &  RoomId 
)
static

Leaves a rtc room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.
Returns
  • 0: success
  • Other values: failure


◆ RtcMuteLocalAudio()

void RtcMuteLocalAudio ( UObject *  WorldContextObject,
ERtcMuteState  InRtcMuteState 
)
static

Mutes local audio to make one's voice unable to be heard be others in the same room.

Parameters
WorldContextObjectUsed to get the information about the current world.
InRtcMuteStateThe state of local audio:
  • 0: off
  • 1: on

◆ RtcPublishRoom()

void RtcPublishRoom ( UObject *  WorldContextObject,
const FString &  RoomId 
)
static

Publishes local audio stream to a room, thereby making the voice heard be others in the same room.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.


◆ RtcRoomPauseAllSubscribedStream()

void RtcRoomPauseAllSubscribedStream ( UObject *  WorldContextObject,
const FString &  RoomId,
ERtcPauseResumeMediaType  InPauseResumeMediaType 
)
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.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.
InPauseResumeMediaTypeMedia type.


◆ RtcRoomResumeAllSubscribedStream()

void RtcRoomResumeAllSubscribedStream ( UObject *  WorldContextObject,
const FString &  RoomId,
ERtcPauseResumeMediaType  InPauseResumeMediaType 
)
static

Resumes all subscribed streams of a room. Once resumed, the voice of users in the room can be heard again.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdThe ID of the room to resume subscribed streams for.
InPauseResumeMediaTypeMedia type.


◆ RtcSetAudioPlaybackDevice()

void RtcSetAudioPlaybackDevice ( UObject *  WorldContextObject,
ERtcAudioPlaybackDevice  InRtcAudioPlaybackDevice 
)
static

Sets the type of audio playback device.

Parameters
WorldContextObjectUsed to get the information about the current world.
InRtcAudioPlaybackDeviceDevice type.


◆ RtcSetAudioScenario()

void RtcSetAudioScenario ( UObject *  WorldContextObject,
ERtcAudioScenarioType  InRtcAudioScenarioType 
)
static

Sets audio scenario type.

Parameters
WorldContextObjectUsed to get the information about the current world.
InRtcAudioScenarioTypeAudio scenario type:
  • 0: Music
  • 1: HighQualityCommunication
  • 2: Communication
  • 3: Media
  • 4: GameStreaming


◆ RtcSetCaptureVolume()

void RtcSetCaptureVolume ( UObject *  WorldContextObject,
ERtcStreamIndex  InRtcStreamIndex,
int  InVolume 
)
static

Sets volume for audio capture.

Parameters
WorldContextObjectUsed to get the information about the current world.
InRtcStreamIndexStream index main/screen.
InVolumeThe volume. The valid value ranges from 0 to 400. 100 indicates keeping the original volume.


◆ RtcSetEarMonitorMode()

void RtcSetEarMonitorMode ( UObject *  WorldContextObject,
ERtcEarMonitorMode  InRtcEarMonitorMode 
)
static

Sets the in-ear monitoring mode.

Parameters
WorldContextObjectUsed to get the information about the current world.
InRtcEarMonitorModeThe state of in-ear monitoring mode:
  • 0: off
  • 1: on


◆ RtcSetEarMonitorVolume()

void RtcSetEarMonitorVolume ( UObject *  WorldContextObject,
int  InVolume 
)
static

Sets the volume for in-ear monitoring.

Parameters
WorldContextObjectUsed to get the information about the current world.
InVolumeThe volume. The valid value ranges from 0 to 400. 100 indicates keeping the original volume.


◆ RtcSetPlaybackVolume()

void RtcSetPlaybackVolume ( UObject *  WorldContextObject,
int  InVolume 
)
static

Sets the playback volume.

Parameters
WorldContextObjectUsed to get the information about the current world.
InVolumeThe volume. The valid value ranges from 0 to 400. 100 indicates keeping the original volume.


◆ RtcStartAudioCapture()

void RtcStartAudioCapture ( UObject *  WorldContextObject)
static

Starts audio capture.

Parameters
WorldContextObjectUsed to get the information about the current world.


◆ RtcStopAudioCapture()

void RtcStopAudioCapture ( UObject *  WorldContextObject)
static

Stops audio capture.

Parameters
WorldContextObjectUsed to get the information about the current world.


◆ RtcUnPublishRoom()

void RtcUnPublishRoom ( UObject *  WorldContextObject,
const FString &  RoomId 
)
static

Stops publishing local audio stream to a room, so others in the same room cannot hear the voice.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.


◆ RtcUpdateToken()

void RtcUpdateToken ( UObject *  WorldContextObject,
const FString &  RoomId,
const FString &  Token 
)
static

Updates room token.

Parameters
WorldContextObjectUsed to get the information about the current world.
RoomIdRoom ID.
TokenThe new token.