Navigation
API > API/Plugins > API/Plugins/PixelStreaming
Allows in-engine playback of incoming WebRTC audio from a particular Pixel Streaming player/peer using their mic in the browser. Note: Each audio component associates itself with a particular Pixel Streaming player/peer (using the the Pixel Streaming player id).
| Name | UPixelStreamingAudioComponent |
| Type | class |
| Header File | /Engine/Plugins/Media/PixelStreaming/Source/PixelStreaming/Public/PixelStreamingAudioComponent.h |
| Include Path | #include "PixelStreamingAudioComponent.h" |
Syntax
UCLASS (Blueprintable, ClassGroup=(PixelStreaming), Meta=(BlueprintSpawnableComponent))
class UPixelStreamingAudioComponent :
public USynthComponent ,
public IPixelStreamingAudioConsumer
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → USynthComponent → UPixelStreamingAudioComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPixelStreamingAudioComponent
(
const FObjectInitializer& ObjectInitializer |
PixelStreamingAudioComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAutoFindPeer | bool | If not already listening to a player/peer will try to attach for listening to the "PlayerToHear" each tick. | PixelStreamingAudioComponent.h |
|
| PlayerToHear | FString | The Pixel Streaming player/peer whose audio we wish to listen to. | PixelStreamingAudioComponent.h |
|
| StreamerToHear | FString | The Pixel Streaming streamer of the player that we wish to listen to. | PixelStreamingAudioComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AudioSink | IPixelStreamingAudioSink * | PixelStreamingAudioComponent.h | ||
| SoundGenerator | TSharedPtr< FWebRTCSoundGenerator, ESPMode::ThreadSafe > | PixelStreamingAudioComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsListeningToPlayer() |
True if listening to a connected WebRTC peer through Pixel Streaming. | PixelStreamingAudioComponent.h |
|
bool ListenTo
(
FString PlayerToListenTo |
Listen to a specific player on the default streamer. If the player is not found this component will be silent. | PixelStreamingAudioComponent.h |
|
void Reset() |
Stops listening to any connected player/peer and resets internal state so component is ready to listen again. | PixelStreamingAudioComponent.h |
|
| Listen to a specific player. If the player is not found this component will be silent. | PixelStreamingAudioComponent.h |
|
|
bool WillListenToAnyPlayer() |
PixelStreamingAudioComponent.h |
Overridden from IPixelStreamingAudioConsumer
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ConsumeRawPCM
(
const int16_t* AudioData, |
PixelStreamingAudioComponent.h | ||
virtual void OnConsumerAdded() |
PixelStreamingAudioComponent.h | ||
virtual void OnConsumerRemoved() |
PixelStreamingAudioComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void TickComponent
(
float DeltaTime, |
PixelStreamingAudioComponent.h |
Overridden from USynthComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
PixelStreamingAudioComponent.h | ||
virtual ISoundGeneratorPtr CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams |
PixelStreamingAudioComponent.h | ||
virtual void OnBeginGenerate() |
PixelStreamingAudioComponent.h | ||
virtual void OnEndGenerate() |
PixelStreamingAudioComponent.h |