# MediaPlaybackTrait.Attributes


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface MediaPlaybackTrait.Attributes : ClusterStruct
```

<br />

Known direct subclasses [MediaPlayback](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlayback)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlayback` | API for the MediaPlayback trait. |

*** ** * ** ***

Attributes for the MediaPlayback cluster.

## Summary

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.TrackStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#activeAudioTrack()` The currently active audio track. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.TrackStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#activeTextTrack()` The currently active text track. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.TrackStruct>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#availableAudioTracks()` The list of available audio tracks. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.TrackStruct>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#availableTextTracks()` The list of available text tracks. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.PlaybackStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#currentState()` The current playback state of media. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#duration()` The duration, in milliseconds, of the media currently being played back. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#playbackSpeed()` The speed at which the current media is being played. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.PlaybackPositionStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#sampledPosition()` The position of playback as of the specified time. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#seekRangeEnd()` The furthest forward valid position to which a client may seek, in milliseconds, relative to the start of the media. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#seekRangeStart()` The earliest valid position to which a client may seek, in milliseconds, relative to the start of the media. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MediaPlaybackTrait.Attributes#startTime()` The start time of the media, such as a livestream event, in UTC (ISO-8601) format. |

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### acceptedCommandList

```
val acceptedCommandList: List<UInt>
```

A list of client-generated commands which are supported by this cluster server instance.

### activeAudioTrack

```
val activeAudioTrack: MediaPlaybackTrait.TrackStruct?
```

The currently active audio track.

**Access type:** Read

### activeTextTrack

```
val activeTextTrack: MediaPlaybackTrait.TrackStruct?
```

The currently active text track.

**Access type:** Read

### attributeList

```
val attributeList: List<UInt>
```

A list of the attribute IDs of the attributes supported by the cluster instance.

### availableAudioTracks

```
val availableAudioTracks: List<MediaPlaybackTrait.TrackStruct>?
```

The list of available audio tracks.

**Access type:** Read

### availableTextTracks

```
val availableTextTracks: List<MediaPlaybackTrait.TrackStruct>?
```

The list of available text tracks.

**Access type:** Read

### clusterRevision

```
val clusterRevision: UShort
```

The revision of the server cluster specification supported by the cluster instance.

### currentState

```
val currentState: MediaPlaybackTrait.PlaybackStateEnum?
```

The current playback state of media.

**Access type:** Read

### duration

```
val duration: ULong?
```

The duration, in milliseconds, of the media currently being played back. If no media is currently being played, this is null.

**Access type:** Read

### featureMap

```
val featureMap: MediaPlaybackTrait.Feature
```

Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero).

### generatedCommandList

```
val generatedCommandList: List<UInt>
```

A list of server-generated commands (server to client) which are supported by this cluster server instance.

### playbackSpeed

```
val playbackSpeed: Float?
```

The speed at which the current media is being played.

**Access type:** Read

### sampledPosition

```
val sampledPosition: MediaPlaybackTrait.PlaybackPositionStruct?
```

The position of playback as of the specified time.

**Access type:** Read

### seekRangeEnd

```
val seekRangeEnd: ULong?
```

The furthest forward valid position to which a client may seek, in milliseconds, relative to the start of the media.

**Access type:** Read

### seekRangeStart

```
val seekRangeStart: ULong?
```

The earliest valid position to which a client may seek, in milliseconds, relative to the start of the media.

**Access type:** Read

### startTime

```
val startTime: ULong?
```

The start time of the media, such as a livestream event, in UTC (ISO-8601) format. This is null when the start time doesn't apply to the current media, such as in the case of prerecorded material.

**Access type:** Read