# 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
public abstract class Representation
```

<br />

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

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

*** ** * ** ***

A DASH representation.

## Summary

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

| ### Constants |
|---|---|
| `static final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#REVISION_ID_DEFAULT() = -1` A default value for `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#revisionId()`. |

| ### Public fields |
|---|---|
| `final https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/BaseUrl>` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#baseUrls()` The base URLs of the representation. |
| `final https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor>` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#essentialProperties()` Essential properties in the representation. |
| `final https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#format()` The format of the representation. |
| `final https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor>` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#inbandEventStreams()` The in-band event streams in the representation. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#initializationUri()` |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#presentationTimeOffsetUs()` The offset of the presentation timestamps in the media stream relative to media time. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#revisionId()` Identifies the revision of the media contained within the representation. |
| `final https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor>` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#supplementalProperties()` Supplemental properties in the adaptation set. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#timescale()` The timescale of the representation in units per second. |

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#getCacheKey()()` Returns a cache key for the representation if set, or null. |
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/DashSegmentIndex` | `https://developer.android.com/reference/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/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#getIndexUri()()` Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of the representation's segment index, or null if the representation provides an index directly. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` | `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation#getInitializationUri()()` Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of the representation's initialization data, or null if no initialization data exists. |
| `static https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation` | `https://developer.android.com/reference/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)( long revisionId, https://developer.android.com/reference/androidx/media3/common/Format format, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/BaseUrl> baseUrls, https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase segmentBase )` Constructs a new instance. |
| `static https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Representation` | `https://developer.android.com/reference/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)( long revisionId, https://developer.android.com/reference/androidx/media3/common/Format format, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/BaseUrl> baseUrls, https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase segmentBase, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> inbandEventStreams, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> essentialProperties, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> supplementalProperties, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html cacheKey )` Constructs a new instance. |

## Constants

### REVISION_ID_DEFAULT

```
public static final long REVISION_ID_DEFAULT = -1
```

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

## Public fields

### baseUrls

```
public final ImmutableList<BaseUrl> baseUrls
```

The base URLs of the representation.

### essentialProperties

```
public final List<Descriptor> essentialProperties
```

Essential properties in the representation. May be empty.

### format

```
public final Format format
```

The format of the representation.

### inbandEventStreams

```
public final List<Descriptor> inbandEventStreams
```

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

### initializationUri

```
public final @Nullable RangedUri initializationUri
```

### presentationTimeOffsetUs

```
public final long presentationTimeOffsetUs
```

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

### revisionId

```
public final long revisionId
```

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

```
public final List<Descriptor> supplementalProperties
```

Supplemental properties in the adaptation set. May be empty.

### timescale

```
public final long timescale
```

The timescale of the representation in units per second.

## Public methods

### getCacheKey

```
public abstract @Nullable String getCacheKey()
```

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

### getIndex

```
public abstract @Nullable DashSegmentIndex getIndex()
```

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

### getIndexUri

```
public abstract @Nullable RangedUri getIndexUri()
```

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

### getInitializationUri

```
public @Nullable RangedUri getInitializationUri()
```

Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/RangedUri` defining the location of the representation's initialization data, or null if no initialization data exists.

### newInstance

```
public static Representation newInstance(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase segmentBase
)
```

Constructs a new instance.

| Parameters |
|---|---|
| `long revisionId` | Identifies the revision of the content. |
| `https://developer.android.com/reference/androidx/media3/common/Format format` | The format of the representation. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/BaseUrl> baseUrls` | The list of base URLs of the representation. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase segmentBase` | A segment base element for the representation. |

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

### newInstance

```
public static Representation newInstance(
    long revisionId,
    Format format,
    List<BaseUrl> baseUrls,
    SegmentBase segmentBase,
    @Nullable List<Descriptor> inbandEventStreams,
    List<Descriptor> essentialProperties,
    List<Descriptor> supplementalProperties,
    @Nullable String cacheKey
)
```

Constructs a new instance.

| Parameters |
|---|---|
| `long revisionId` | Identifies the revision of the content. |
| `https://developer.android.com/reference/androidx/media3/common/Format format` | The format of the representation. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/BaseUrl> baseUrls` | The list of base URLs of the representation. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/SegmentBase segmentBase` | A segment base element for the representation. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> inbandEventStreams` | The in-band event streams in the representation. May be null. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> essentialProperties` | Essential properties in the representation. May be empty. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/dash/manifest/Descriptor> supplementalProperties` | Supplemental properties in the representation. May be empty. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html cacheKey` | An optional key to be returned from `https://developer.android.com/reference/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/androidx/media3/exoplayer/dash/manifest/Representation` | The constructed instance. |