# Period

Artifact: [androidx.media3:media3-exoplayer-dash](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/dash/manifest/Period.java+class:androidx.media3.exoplayer.dash.manifest.Period)

*** ** * ** ***


```
@UnstableApi
class Period
```

<br />

*** ** * ** ***

Encapsulates media content components over a contiguous period of time.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>)( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>! )` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>)( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!, eventStreams: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>! )` |
| `[Period](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>,androidx.media3.exoplayer.dash.manifest.Descriptor))( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!, eventStreams: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>!, assetIdentifier: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Descriptor? )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>,androidx.media3.exoplayer.dash.manifest.Descriptor,java.util.List<androidx.media3.exoplayer.dash.manifest.AlternativeMpdEvent>)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>,androidx.media3.exoplayer.dash.manifest.Descriptor,java.util.List<androidx.media3.exoplayer.dash.manifest.AlternativeMpdEvent>)( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!, eventStreams: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>!, assetIdentifier: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Descriptor?, alternativeMpdEvents: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent!>! )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#getAdaptationSetIndex(int)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the index of the first adaptation set of a given type, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no adaptation set of the specified type exists. |

| ### Public properties |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#adaptationSets()` The adaptation sets belonging to the period. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#alternativeMpdEvents()` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent`s belonging to the period, sorted by presentation time. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Descriptor?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#assetIdentifier()` The asset identifier for this period, if one exists |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#eventStreams()` The event stream belonging to the period. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#id()` The period identifier, if one exists. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#startMs()` The start time of the period in milliseconds, relative to the start of the manifest. |

## Public constructors

### Period

```
Period(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!
)
```

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The period identifier. May be null. |
| `startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start time of the period in milliseconds. |
| `adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!` | The adaptation sets belonging to the period. |

### Period

```
Period(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!,
    eventStreams: (Mutable)List<EventStream!>!
)
```

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The period identifier. May be null. |
| `startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start time of the period in milliseconds. |
| `adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!` | The adaptation sets belonging to the period. |
| `eventStreams: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream`s belonging to the period. |

### Period

```
[Period](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>,androidx.media3.exoplayer.dash.manifest.Descriptor))(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!,
    eventStreams: (Mutable)List<EventStream!>!,
    assetIdentifier: Descriptor?
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Period#Period(java.lang.String,long,java.util.List<androidx.media3.exoplayer.dash.manifest.AdaptationSet>,java.util.List<androidx.media3.exoplayer.dash.manifest.EventStream>,androidx.media3.exoplayer.dash.manifest.Descriptor,java.util.List<androidx.media3.exoplayer.dash.manifest.AlternativeMpdEvent>)` instead.

### Period

```
Period(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!,
    eventStreams: (Mutable)List<EventStream!>!,
    assetIdentifier: Descriptor?,
    alternativeMpdEvents: (Mutable)List<AlternativeMpdEvent!>!
)
```

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The period identifier. May be null. |
| `startMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start time of the period in milliseconds. |
| `adaptationSets: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AdaptationSet!>!` | The adaptation sets belonging to the period. |
| `eventStreams: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/EventStream`s belonging to the period. |
| `assetIdentifier: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Descriptor?` | The asset identifier for this period, or `null`. |
| `alternativeMpdEvents: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent`s belonging to the period. |

## Public functions

### getAdaptationSetIndex

```
fun getAdaptationSetIndex(type: Int): Int
```

Returns the index of the first adaptation set of a given type, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no adaptation set of the specified type exists.

| Parameters |
|---|---|
| `type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | An adaptation set type. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the first adaptation set of the specified type, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()`. |

## Public properties

### adaptationSets

```
val adaptationSets: (Mutable)List<AdaptationSet!>!
```

The adaptation sets belonging to the period.

### alternativeMpdEvents

```
val alternativeMpdEvents: ImmutableList<AlternativeMpdEvent!>!
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent`s belonging to the period, sorted by presentation time.

### assetIdentifier

```
val assetIdentifier: Descriptor?
```

The asset identifier for this period, if one exists

### eventStreams

```
val eventStreams: (Mutable)List<EventStream!>!
```

The event stream belonging to the period.

### id

```
val id: String?
```

The period identifier, if one exists.

### startMs

```
val startMs: Long
```

The start time of the period in milliseconds, relative to the start of the manifest.