# Broadcasting

The Stream Video SDK has support for HLS broadcasting.

### Start and Stop HLS broadcasting

```kotlin
call.startHLS()
call.stopHLS()
```

After few seconds of setup, broadcasting will start and the state of the call will be updated: the `call.state.broadcasting` boolean flag will become `true`.

### Listening to Broadcasting Events

You can listen to broadcasting-related events and change to UI accordingly.

```kotlin
val sub = subscribeFor(
    CallHLSBroadcastingStartedEvent::class.java,
    CallHLSBroadcastingStoppedEvent::class.java,
    CallHLSBroadcastingFailedEvent::class.java,
) {
    Log.e(TAG, "Event type: ${it.getEventType()}")
}

// stop listening
sub.dispose()
```

See more about subscribing to events on the [events](/video/docs/android/advanced/events/) page.

### Retrieving the Broadcast URL

The URL for the broadcast can be retrieved from the `CallHLSBroadcastingStartedEvent` event. It can be used by others to watch the broadcast.

```kotlin
call.subscribe { event ->
    when (event) {
        is CallHLSBroadcastingStartedEvent -> {
            Log.d(TAG, event.hlsPlaylistUrl)
        }
    }
}
```

### Displaying HLS

On Android you can play a HLS broadcast by using ExoPlayer.

```kotlin
implementation "androidx.media3:media3-exoplayer:1.0.2"
implementation "androidx.media3:media3-ui:1.0.2"
implementation "androidx.media3:media3-exoplayer-hls:1.0.2"
```

[This](https://proandroiddev.com/learn-with-code-jetpack-compose-playing-media-part-3-3792bdfbe1ea) article explains how to use ExoPlayer with Compose.

### RTMP-In

You can also use RTMP streams as input for a call.

```kotlin
val url = call.state.ingress.value?.rtmp?.address
val streamingKey = call.state.ingress.value?.rtmp?.streamKey
```

You can read more about RTMP-In in our [livestreaming tutorial](https://getstream.io/video/sdk/android/tutorial/livestreaming).

We plan to add support for other livestreaming protocols in the future. If something is missing be sure to let us know.

---

This page was last updated at 2025-08-15T14:16:35.370Z.

For the most recent version of this documentation, visit [https://getstream.io/video/docs/android/advanced/broadcasting/](https://getstream.io/video/docs/android/advanced/broadcasting/).