# SegmentDownloader.Segment

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

*** ** * ** ***


```
protected class SegmentDownloader.Segment : Comparable<SegmentDownloader.Segment!>
```

<br />

*** ** * ** ***

Smallest unit of content to be downloaded.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#Segment(long,androidx.media3.datasource.DataSpec)(startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!)` Constructs a Segment. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#compareTo(androidx.media3.exoplayer.offline.SegmentDownloader.Segment)(other: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/SegmentDownloader.Segment!)` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#dataSpec()` The `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec` of the segment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#startTimeUs()` The start time of the segment in microseconds. |

## Public constructors

### Segment

```
Segment(startTimeUs: Long, dataSpec: DataSpec!)
```

Constructs a Segment.

## Public functions

### compareTo

```
fun compareTo(other: SegmentDownloader.Segment!): Int
```

## Public properties

### dataSpec

```
val dataSpec: DataSpec!
```

The `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec` of the segment.

### startTimeUs

```
val startTimeUs: Long
```

The start time of the segment in microseconds.