# SsManifest

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

*** ** * ** ***


```
@UnstableApi
public class SsManifest implements FilterableManifest<SsManifest>
```

<br />

*** ** * ** ***

Represents a SmoothStreaming manifest.

See the [IIS Smooth Streaming Client Manifest Format](http://msdn.microsoft.com/en-us/library/ee673436(v=vs.90).aspx)

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest.ProtectionElement` Represents a protection element containing a single header. |
| `public class https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest.StreamElement` Represents a StreamIndex element. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#UNSET_LOOKAHEAD() = -1` |

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#durationUs()` The overall presentation duration of the media in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the duration is unknown. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#dvrWindowLengthUs()` The length of the trailing window for a live broadcast in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the stream is not live or if the window length is unspecified. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#isLive()` Whether the manifest describes a live presentation still in progress. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#lookAheadCount()` The number of fragments in a lookahead, or `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#UNSET_LOOKAHEAD()` if the lookahead is unspecified. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#majorVersion()` The client manifest major version. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#minorVersion()` The client manifest minor version. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest.ProtectionElement` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#protectionElement()` Content protection information, or null if the content is not protected. |
| `final SsManifest.StreamElement[]` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#streamElements()` The contained stream elements. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#SsManifest(int,int,long,long,long,int,boolean,androidx.media3.exoplayer.smoothstreaming.manifest.SsManifest.ProtectionElement,androidx.media3.exoplayer.smoothstreaming.manifest.SsManifest.StreamElement[])( int majorVersion, int minorVersion, long timescale, long duration, long dvrWindowLength, int lookAheadCount, boolean isLive, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest.ProtectionElement protectionElement, SsManifest.StreamElement[] streamElements )` |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest` | `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#copy(java.util.List<androidx.media3.common.StreamKey>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/StreamKey> streamKeys)` Returns a copy of the manifest including only the streams specified by the given keys. |

## Constants

### UNSET_LOOKAHEAD

```
public static final int UNSET_LOOKAHEAD = -1
```

## Public fields

### durationUs

```
public final long durationUs
```

The overall presentation duration of the media in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the duration is unknown.

### dvrWindowLengthUs

```
public final long dvrWindowLengthUs
```

The length of the trailing window for a live broadcast in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the stream is not live or if the window length is unspecified.

### isLive

```
public final boolean isLive
```

Whether the manifest describes a live presentation still in progress.

### lookAheadCount

```
public final int lookAheadCount
```

The number of fragments in a lookahead, or `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#UNSET_LOOKAHEAD()` if the lookahead is unspecified.

### majorVersion

```
public final int majorVersion
```

The client manifest major version.

### minorVersion

```
public final int minorVersion
```

The client manifest minor version.

### protectionElement

```
public final @Nullable SsManifest.ProtectionElement protectionElement
```

Content protection information, or null if the content is not protected.

### streamElements

```
public final SsManifest.StreamElement[] streamElements
```

The contained stream elements.

## Public constructors

### SsManifest

```
public SsManifest(
    int majorVersion,
    int minorVersion,
    long timescale,
    long duration,
    long dvrWindowLength,
    int lookAheadCount,
    boolean isLive,
    @Nullable SsManifest.ProtectionElement protectionElement,
    SsManifest.StreamElement[] streamElements
)
```

| Parameters |
|---|---|
| `int majorVersion` | The client manifest major version. |
| `int minorVersion` | The client manifest minor version. |
| `long timescale` | The timescale of the media as the number of units that pass in one second. |
| `long duration` | The overall presentation duration in units of the timescale attribute, or 0 if the duration is unknown. |
| `long dvrWindowLength` | The length of the trailing window in units of the timescale attribute, or 0 if this attribute is unspecified or not applicable. |
| `int lookAheadCount` | The number of fragments in a lookahead, or `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest#UNSET_LOOKAHEAD()` if this attribute is unspecified or not applicable. |
| `boolean isLive` | True if the manifest describes a live presentation still in progress. False otherwise. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest.ProtectionElement protectionElement` | Content protection information, or null if the content is not protected. |
| `SsManifest.StreamElement[] streamElements` | The contained stream elements. |

## Public methods

### copy

```
public final SsManifest copy(List<StreamKey> streamKeys)
```

Returns a copy of the manifest including only the streams specified by the given keys. If the manifest is unchanged then the instance may return itself.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/StreamKey> streamKeys` | A non-empty list of stream keys. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/smoothstreaming/manifest/SsManifest` | The filtered manifest. |