> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Live Streaming

> Set up in-game live streaming with LIV Camera Kit in Unity. Stream directly to YouTube and Twitch via RTMP from inside your game -- no external software required.

As of LCK v1.4.0, players can live stream directly from inside your game to YouTube and Twitch via RTMP. No external streaming software is required.

## How it works

Live streaming uses the same camera system as recording. When a user starts a stream, the active `LckCamera` output is encoded and sent to an RTMP endpoint in real time. Users can switch cameras during a live stream without interruption.

## Setup

Live streaming requires internet access. LCK v1.4.0+ automatically adds internet permission to your `AndroidManifest.xml` during the build process and prevents Meta Quest's `ForceRemoveInternetPermission` feature from blocking it.

This behavior is toggleable in **Edit > Project Settings > LCK**.

The streaming UI is included in the LCK tablet. Users configure their stream destination (YouTube or Twitch) and start streaming from the tablet interface.

## Streaming API

For programmatic control:

```csharp theme={null}
[InjectLck] private ILckService _lckService;

// Start and stop streaming
_lckService.StartStreaming();
_lckService.StopStreaming();

// Query state
_lckService.IsStreaming();       // LckResult<bool>
_lckService.GetStreamDuration(); // LckResult<TimeSpan>
```

### Events

```csharp theme={null}
_lckService.OnStreamingStarted += (result) => { /* handle */ };
_lckService.OnStreamingStopped += (result) => { /* handle */ };
```

## Streaming quality

Streaming uses the same quality configuration as recording. Resolution, bitrate, and framerate are set through the `LckQualityConfig` ScriptableObject or programmatically via the `LckService` API. See [Recording](/unity/recording) for details on quality presets.

## Pairing to LIV Hub in editor

You must pair your game to LIV Hub on your Meta Quest. ie: LIV Hub doesn't need to be on the same device that you're pairing the game to.

1. In editor, while in play mode, go to the streaming tab to trigger the pairing code
2. In LIV Hub on the Meta Quest, pair your game via the LIV Camera Games section
3. Enter the pairing code in the editor

## Supported platforms

| Platform     | YouTube | Twitch |
| ------------ | ------- | ------ |
| Meta Quest   | Yes     | Yes    |
| Windows PCVR | No      | No     |

<Info>
  As of v1.4.3, streaming no longer requires a user subscription.
</Info>
