# Representation.SingleSegmentRepresentation

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.SingleSegmentRepresentation)

*** ** * ** ***


```
class Representation.SingleSegmentRepresentation : Representation
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.media3.exoplayer.dash.manifest.Representation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) ||
|   | ↳ | [androidx.media3.exoplayer.dash.manifest.Representation.SingleSegmentRepresentation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation) |

*** ** * ** ***

A DASH representation consisting of a single segment.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#SingleSegmentRepresentation(long,androidx.media3.common.Format,java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>,androidx.media3.exoplayer.dash.manifest.SegmentBase.SingleSegmentBase,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://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.SingleSegmentBase!, 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?, contentLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashSegmentIndex?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#getIndex()()` Returns an index if the representation provides one directly, or null otherwise. |
| `java-static 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.SingleSegmentRepresentation#newInstance(long,androidx.media3.common.Format,java.lang.String,long,long,long,long,java.util.List<androidx.media3.exoplayer.dash.manifest.Descriptor>,java.lang.String,long)( revisionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!, uri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, initializationStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, initializationEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, indexStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, indexEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, 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!>!, cacheKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, contentLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#cacheKey()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#contentLength()` The content length, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#LENGTH_UNSET()` if unknown. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/RangedUri?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#indexUri()` |
| `https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation.SingleSegmentRepresentation#uri()` The uri of the single segment. |

### Inherited Constants

From [androidx.media3.exoplayer.dash.manifest.Representation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) `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()`.

### Inherited functions

From [androidx.media3.exoplayer.dash.manifest.Representation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) `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.

### Inherited properties

From [androidx.media3.exoplayer.dash.manifest.Representation](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Representation) `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.

## Public constructors

### SingleSegmentRepresentation

```
SingleSegmentRepresentation(
    revisionId: Long,
    format: Format!,
    baseUrls: (Mutable)List<BaseUrl!>!,
    segmentBase: SegmentBase.SingleSegmentBase!,
    inbandEventStreams: (Mutable)List<Descriptor!>?,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!,
    cacheKey: String?,
    contentLength: Long
)
```

| 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 base urls of the representation. |
| `segmentBase: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/SegmentBase.SingleSegmentBase!` | The segment base underlying 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.SingleSegmentRepresentation#getCacheKey()`, or null. |
| `contentLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The content length, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#LENGTH_UNSET()` if unknown. |

## Public functions

### getIndex

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

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

### newInstance

```
java-static fun newInstance(
    revisionId: Long,
    format: Format!,
    uri: String!,
    initializationStart: Long,
    initializationEnd: Long,
    indexStart: Long,
    indexEnd: Long,
    inbandEventStreams: (Mutable)List<Descriptor!>!,
    cacheKey: String?,
    contentLength: Long
): Representation.SingleSegmentRepresentation!
```

| 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. |
| `uri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The uri of the media. |
| `initializationStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset of the first byte of initialization data. |
| `initializationEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset of the last byte of initialization data. |
| `indexStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset of the first byte of index data. |
| `indexEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset of the last byte of index data. |
| `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. |
| `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.SingleSegmentRepresentation#getCacheKey()`, or null. |
| `contentLength: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The content length, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#LENGTH_UNSET()` if unknown. |

## Public properties

### cacheKey

```
val cacheKey: String?
```

### contentLength

```
val contentLength: Long
```

The content length, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#LENGTH_UNSET()` if unknown.

### indexUri

```
val indexUri: RangedUri?
```

### uri

```
val uri: Uri!
```

The uri of the single segment.