# How to insert subtitles on Android

This article describes how you can side-load subtitles or closed captions, i.e. how you can add text tracks which are not part of your HLS or MPEG-DASH manifest.

Every source description has a text tracks property, which accepts an array of side-loaded text tracks. All valid tracks are available for playback as long as the player's source is not set again.

Text track descriptions can also be used for other purposes, e.g. for including preview thumbnails and chapters.

## Usage

Each text track is described by a [`TextTrackDescription`](https://docs-preview.optiview.dolby.com/pr-861/theoplayer/v11/api-reference/android/com/theoplayer/android/api/source/TextTrackDescription).

```kotlin
val sourceWithSubs = SourceDescription.Builder("//path/to/your-manifest.m3u8")
    .textTracks(
        TextTrackDescription.Builder("path/to/your-subs-track1.vtt")
            .isDefault(true)
            .kind(TextTrackKind.SUBTITLES)
            .srclang("en")
            .label("English subs")
            .build()
    )
    .build()
```

## Related articles

* [How to dynamically change the visible captions](https://docs-preview.optiview.dolby.com/pr-861/theoplayer/how-to-guides/android/text-tracks/change-visible-captions.md)
* [How to programmatically enable or disable text tracks](https://docs-preview.optiview.dolby.com/pr-861/theoplayer/how-to-guides/android/text-tracks/enable-disable-text-tracks.md)
* [How to implement preview thumbnails](https://docs-preview.optiview.dolby.com/pr-861/theoplayer/how-to-guides/android/text-tracks/preview-thumbnails.md)
