Chimera Bridge

Chimera Publisher

Main component for connecting and publishing streams

Chimera Publisher

The ChimeraPublisherComponent is the core component for connecting to a room and publishing audio/video streams.

Properties

PropertyTypeDescription
RoomUrlFStringServer WebSocket URL
TokenFStringJWT access token
RoleEChimeraClientRoleClient role (Auto/Publisher/Subscriber/Both)
bReceiveAudioboolEnable receiving audio (required for lip sync)
SampleRateint32Audio sample rate (default: 48000)
Channelsint32Audio channels (1 = mono recommended)

Events

OnConnected

Fired when successfully connected to a room.

UPROPERTY(BlueprintAssignable)
FOnChimeraConnected OnConnected;

OnDisconnected

Fired when disconnected from the room.

UPROPERTY(BlueprintAssignable)
FOnChimeraDisconnected OnDisconnected;

OnAudioDataReceived

Fired when audio data is received from the room. Use this for lip sync integration or feeding AEC.

UPROPERTY(BlueprintAssignable)
FOnChimeraAudioDataReceived OnAudioDataReceived;
// Parameters: AudioData (TArray<float>), FramesPerChannel, Channels, SampleRate

Methods

Connect

Connect to the room using configured URL and token.

UFUNCTION(BlueprintCallable)
void Connect();

Disconnect

Disconnect from the current room.

UFUNCTION(BlueprintCallable)
void Disconnect();

SendAudioData

Send audio data to the room.

UFUNCTION(BlueprintCallable)
void SendAudioData(const TArray<float>& AudioData, int32 FramesPerChannel);

Blueprint Usage

  1. Add the component to your Actor
  2. Set the Room URL and Token properties
  3. Call Connect() to join the room
  4. Bind to OnAudioDataReceived for incoming audio

C++ Example

void AMyActor::BeginPlay()
{
    Super::BeginPlay();
 
    Publisher = FindComponentByClass<UChimeraPublisherComponent>();
    if (Publisher)
    {
        Publisher->OnConnected.AddDynamic(this, &AMyActor::HandleConnected);
        Publisher->OnAudioDataReceived.AddDynamic(this, &AMyActor::HandleAudioReceived);
        Publisher->Connect();
    }
}
 
void AMyActor::HandleConnected()
{
    UE_LOG(LogTemp, Log, TEXT("Connected to room!"));
}
 
void AMyActor::HandleAudioReceived(const TArray<float>& AudioData, int32 FramesPerChannel, int32 Channels, int32 SampleRate)
{
    // Process received audio (e.g., feed to AEC or lip sync)
}

On this page