# Representation

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/Representation.java+class:androidx.media3.exoplayer.dash.manifest.Representation)

*** ** * ** ***


```
@UnstableApi
abstract class Representation
```

<br />

Known direct subclasses [Representation.MultiSegmentRepresentation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.MultiSegmentRepresentation), [Representation.SingleSegmentRepresentation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.MultiSegmentRepresentation` | A DASH representation consisting of multiple segments. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation` | A DASH representation consisting of a single segment. |

*** ** * ** ***

A DASH representation.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.MultiSegmentRepresentation : https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation, https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex` A DASH representation consisting of multiple segments. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation : https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation` A DASH representation consisting of a single segment. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#REVISION_ID_DEFAULT() = -1` A default value for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#revisionId()`. |

| ### Public functions |
|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#getCacheKey()()` Returns a cache key for the representation if set, or null. |
| `abstract https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#getIndex()()` Returns an index if the representation provides one directly, or null otherwise. |
| `abstract https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#getIndexUri()()` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of the representation's segment index, or null if the representation provides an index directly. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#newInstance(long,androidx.media3.common.Format,java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>,androidx.media3.exoplayer.dash.manifest.SegmentBase)( revisionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!, baseUrls: (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/BaseUrl!>!, segmentBase: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase! )` Constructs a new instance. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#newInstance(long,androidx.media3.common.Format,java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>,androidx.media3.exoplayer.dash.manifest.SegmentBase,java.util.List<androidx.media3.exoplayer.dash.manifest.Descriptor>,java.util.List<androidx.media3.exoplayer.dash.manifest.Descriptor>,java.util.List<androidx.media3.exoplayer.dash.manifest.Descriptor>,java.lang.String)( revisionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!, baseUrls: (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/BaseUrl!>!, segmentBase: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase!, inbandEventStreams: (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/Descriptor!>?, essentialProperties: (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/Descriptor!>!, supplementalProperties: (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/Descriptor!>!, cacheKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? )` Constructs a new instance. |

| ### Public properties |
|---|---|
| `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/BaseUrl!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#baseUrls()` The base URLs of the representation. |
| `(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/Descriptor!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#essentialProperties()` Essential properties in the representation. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#format()` The format of the representation. |
| `(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/Descriptor!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#inbandEventStreams()` The in-band event streams in the representation. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#initializationUri()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#presentationTimeOffsetUs()` The offset of the presentation timestamps in the media stream relative to media time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#revisionId()` Identifies the revision of the media contained within the representation. |
| `(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/Descriptor!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#supplementalProperties()` Supplemental properties in the adaptation set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#timescale()` The timescale of the representation in units per second. |

## Constants

### REVISION_ID_DEFAULT

```
const val REVISION_ID_DEFAULT = -1: Long
```

A default value for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#revisionId()`.

## Public functions

### getCacheKey

```
abstract fun getCacheKey(): String?
```

Returns a cache key for the representation if set, or null.

### getIndex

```
abstract fun getIndex(): DashSegmentIndex?
```

Returns an index if the representation provides one directly, or null otherwise.

### getIndexUri

```
abstract fun getIndexUri(): RangedUri?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of the representation's segment index, or null if the representation provides an index directly.

### newInstance

```
java-static fun newInstance(
    revisionId: Long,
    format: Format!,
    baseUrls: (Mutable)List<BaseUrl!>!,
    segmentBase: SegmentBase!
): Representation!
```

Constructs a new instance.

| Parameters |
|---|---|
| `revisionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Identifies the revision of the content. |
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The format of the representation. |
| `baseUrls: (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/BaseUrl!>!` | The list of base URLs of the representation. |
| `segmentBase: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase!` | A segment base element for the representation. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation!` | The constructed instance. |

### newInstance

```
java-static fun newInstance(
    revisionId: Long,
    format: Format!,
    baseUrls: (Mutable)List<BaseUrl!>!,
    segmentBase: SegmentBase!,
    inbandEventStreams: (Mutable)List<Descriptor!>?,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!,
    cacheKey: String?
): Representation!
```

Constructs a new instance.

| Parameters |
|---|---|
| `revisionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Identifies the revision of the content. |
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The format of the representation. |
| `baseUrls: (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/BaseUrl!>!` | The list of base URLs of the representation. |
| `segmentBase: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase!` | A segment base element for the representation. |
| `inbandEventStreams: (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/Descriptor!>?` | The in-band event streams in the representation. May be null. |
| `essentialProperties: (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/Descriptor!>!` | Essential properties in the representation. May be empty. |
| `supplementalProperties: (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/Descriptor!>!` | Supplemental properties in the representation. May be empty. |
| `cacheKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | An optional key to be returned from `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation#getCacheKey()`, or null. This parameter is ignored if `segmentBase` consists of multiple segments. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation!` | The constructed instance. |

## Public properties

### baseUrls

```
val baseUrls: ImmutableList<BaseUrl!>!
```

The base URLs of the representation.

### essentialProperties

```
val essentialProperties: (Mutable)List<Descriptor!>!
```

Essential properties in the representation. May be empty.

### format

```
val format: Format!
```

The format of the representation.

### inbandEventStreams

```
val inbandEventStreams: (Mutable)List<Descriptor!>!
```

The in-band event streams in the representation. May be empty.

### initializationUri

```
val initializationUri: RangedUri?
```

### presentationTimeOffsetUs

```
val presentationTimeOffsetUs: Long
```

The offset of the presentation timestamps in the media stream relative to media time.

### revisionId

```
val revisionId: Long
```

Identifies the revision of the media contained within the representation. If the media can change over time (e.g. as a result of it being re-encoded), then this identifier can be set to uniquely identify the revision of the media. The timestamp at which the media was encoded is often a suitable.

### supplementalProperties

```
val supplementalProperties: (Mutable)List<Descriptor!>!
```

Supplemental properties in the adaptation set. May be empty.

### timescale

```
val timescale: Long
```

The timescale of the representation in units per second.