Skip to main content

What Problem Does This Solve?

ULCKStreamingSubsystem is the Blueprint-friendly entry point for live streaming:
  • Authenticate with LIV’s streaming service via device pairing
  • Start and stop live streams to YouTube, Twitch, or custom RTMP targets
  • Monitor stream state, errors, and configuration changes
It implements ILCKStreamingFeature and exposes everything as BlueprintCallable / BlueprintAssignable.

When to Use This

Use ULCKStreamingSubsystem when:
  • Building a “Go Live” button in your game
  • Creating a streaming dashboard UI
  • Integrating streaming into your game flow
Don’t use this directly if: You’re building a custom streaming backend — implement ILCKStreamingFeature instead.

Accessing the Subsystem

ULCKStreamingSubsystem* Streaming =
    GetGameInstance()->GetSubsystem<ULCKStreamingSubsystem>();

Delegates

All delegates are BlueprintAssignable.
DelegateSignatureDescription
OnPairingCodeReceivedFOnLCKPairingCodeReceived(const FString&, Code)Pairing code ready for display
OnAuthenticatedFOnLCKAuthenticated()User successfully authenticated
OnStreamingConfigReceivedFOnLCKStreamingConfigReceived(ELCKStreamingTargetType, const FLCKUserSubscription&)Config loaded from server
OnStreamStartedFOnLCKStreamStarted()Live stream has started
OnStreamStoppedFOnLCKStreamStopped()Live stream ended normally
OnStreamErrorFOnLCKStreamError(const FString&, ErrorMessage)Streaming error occurred
OnLoggedOutFOnLCKLoggedOut()User logged out

Authentication Methods

MethodReturnDescription
StartLogin()voidBegin device-code login flow (polls every 2.5s)
CancelLogin()voidCancel in-progress login
GetPairingCode()FStringCurrent pairing code (BlueprintPure)
IsAuthenticated()boolCheck if authenticated (BlueprintPure)
Logout()voidLog out and clear credentials

Configuration Methods

MethodReturnDescription
RefreshStreamingConfig(bool bSilent)voidRefresh config from server (bSilent suppresses errors)
HasStreamingTarget()boolHas YouTube/Twitch/Manual target? (BlueprintPure)
HasActiveSubscription()boolHas active LIV subscription? (BlueprintPure)
GetStreamingTargetType()ELCKStreamingTargetTypeCurrent target type (BlueprintPure)

Streaming Methods

MethodReturnDescription
StartStreaming()boolStart live stream (15s timeout)
StopStreaming()voidStop live stream
IsStreaming()boolIs currently streaming? (BlueprintPure)
IsStartingOrStreaming()boolStarting or streaming?

Platform Methods

MethodReturnDescription
LaunchHub()voidOpen LIV Hub (Android only)
IsHubInstalled()boolIs LIV Hub installed?
GetStreamingTargetName()FStringDisplay name (e.g., “YouTube”)
GetLastLogoutReason()FStringReason for last automatic logout

Streaming Bitrate Presets

YouTube

QualityVideo BitrateAudio Bitrate
SD4 Mbps128 Kbps
HD @308 Mbps128 Kbps
HD @6012 Mbps128 Kbps
2K24 Mbps128 Kbps
4K35 Mbps128 Kbps

Twitch

QualityVideo BitrateAudio Bitrate
SD3 Mbps96 Kbps
HD @304.5 Mbps96 Kbps
HD @606 Mbps96 Kbps
2K9 Mbps96 Kbps
4K10 Mbps96 Kbps
Keyframe interval is fixed at 2 seconds. Bitrates are applied automatically based on the streaming target and quality profile.

Timing Constants

ConstantValueDescription
Auth poll interval2.5sPairing confirmation polling
Stream start timeout15sMaximum RTMP connection wait
Health check interval5sEncoder health monitoring
Health check tolerance2Consecutive failures before stopping

Usage Example

UCLASS()
class UStreamingManager : public UActorComponent
{
    GENERATED_BODY()

public:
    virtual void BeginPlay() override
    {
        Super::BeginPlay();

        auto* Streaming = GetWorld()->GetGameInstance()
            ->GetSubsystem<ULCKStreamingSubsystem>();
        if (!Streaming) return;

        Streaming->OnPairingCodeReceived.AddDynamic(
            this, &UStreamingManager::OnCode);
        Streaming->OnAuthenticated.AddDynamic(
            this, &UStreamingManager::OnAuth);
        Streaming->OnStreamStarted.AddDynamic(
            this, &UStreamingManager::OnLive);
        Streaming->OnStreamError.AddDynamic(
            this, &UStreamingManager::OnError);
    }

    UFUNCTION(BlueprintCallable)
    void Login()
    {
        auto* S = GetWorld()->GetGameInstance()
            ->GetSubsystem<ULCKStreamingSubsystem>();
        S->StartLogin();
    }

    UFUNCTION(BlueprintCallable)
    void ToggleStream()
    {
        auto* S = GetWorld()->GetGameInstance()
            ->GetSubsystem<ULCKStreamingSubsystem>();

        if (S->IsStreaming())
            S->StopStreaming();
        else if (S->HasStreamingTarget())
            S->StartStreaming();
    }

private:
    UFUNCTION() void OnCode(const FString& Code) { ShowPairingUI(Code); }
    UFUNCTION() void OnAuth() { ShowStreamControls(); }
    UFUNCTION() void OnLive() { ShowLiveIndicator(); }
    UFUNCTION() void OnError(const FString& E) { ShowError(E); }
};

Key Takeaways

GameInstance subsystem — Available globally, survives level transitions
Blueprint-ready — All methods and delegates are Blueprint accessible
Auth-first flow — Login, configure target, then stream
Check prerequisites — Verify IsAuthenticated() and HasStreamingTarget() before streaming