# SlidingWeightedAverageBandwidthStatistic.Sample

# SlidingWeightedAverageBandwidthStatistic.Sample

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/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.java+class:androidx.media3.exoplayer.upstream.experimental.SlidingWeightedAverageBandwidthStatistic.Sample)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/exoplayer/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.Sample "View this page in Java")

<br />

```
class SlidingWeightedAverageBandwidthStatistic.Sample
```

<br />

*** ** * ** ***

Represents a bandwidth sample.

## Summary

|                                                                                                                                                                                                                                    ### Public constructors                                                                                                                                                                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Sample](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.Sample#Sample(long,double,long))`(bitrate: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, weight: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)`, timeAddedMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Creates a new sample. |

|                               ### Public properties                               |
|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)     | [bitrate](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.Sample#bitrate()) The sample bitrate.                                      |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)     | [timeAddedMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.Sample#timeAddedMs()) The time this sample was added, in milliseconds. |
| [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) | [weight](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.Sample#weight()) The sample weight.                                         |

## Public constructors

### Sample

```
Sample(bitrate: Long, weight: Double, timeAddedMs: Long)
```

Creates a new sample.  

## Public properties

### bitrate

```
val bitrate: Long
```

The sample bitrate.  

### timeAddedMs

```
val timeAddedMs: Long
```

The time this sample was added, in milliseconds. Timestamps should come from the same source, so that samples can reliably be ordered in time. It is suggested to use[elapsedRealtime](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock#elapsedRealtime()).  

### weight

```
val weight: Double
```

The sample weight.