MediaPlayback

interface MediaPlayback : MediaPlaybackTrait.Attributes, MatterTrait, MediaPlaybackCommands


API for the MediaPlayback trait. This trait provides an interface for controlling media playback (play, pause, and so forth) on a media device such as a TV, set-top box, or smart speaker.

Summary

Nested types

Descriptor enum for this trait's attributes.

Descriptor enum for this trait's commands.

Public properties

open TraitFactory<MediaPlayback>

Inherited functions

From com.google.home.matter.standard.MediaPlaybackCommands
suspend Unit
activateAudioTrack(trackId: String, audioOutputIndex: UByte)
suspend Unit
suspend Unit
suspend MediaPlaybackTrait.FastForwardCommand.Response

Fast forward the current media.

suspend MediaPlaybackTrait.NextCommand.Response

Move to the next item in the media.

suspend MediaPlaybackTrait.PauseCommand.Response

Pause the current media.

suspend MediaPlaybackTrait.PlayCommand.Response

Play the current media.

suspend MediaPlaybackTrait.PreviousCommand.Response

Move to the previous item in the current media.

suspend MediaPlaybackTrait.RewindCommand.Response

Rewind the current media.

suspend MediaPlaybackTrait.SeekCommand.Response
seek(position: ULong)

Change the playback position in the current media to the specified position.

suspend MediaPlaybackTrait.SkipBackwardCommand.Response
skipBackward(deltaPositionMilliseconds: ULong)

Skip backward by a specified amount of time within the current media.

suspend MediaPlaybackTrait.SkipForwardCommand.Response
skipForward(deltaPositionMilliseconds: ULong)

Skip forward by a specified amount of time within the current media.

suspend MediaPlaybackTrait.StartOverCommand.Response

Start over from the beginning of the current media.

suspend MediaPlaybackTrait.StopCommand.Response

Stop playing the current media.

From com.google.home.TraitStateInvalidation
suspend Unit

Inherited properties

From com.google.home.matter.standard.MediaPlaybackTrait.Attributes
List<UInt>

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

MediaPlaybackTrait.TrackStruct?
MediaPlaybackTrait.TrackStruct?
List<UInt>

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

List<MediaPlaybackTrait.TrackStruct>?
List<MediaPlaybackTrait.TrackStruct>?
UShort

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

MediaPlaybackTrait.PlaybackStateEnum?

The current playback state of media.

ULong?

The duration, in milliseconds, of the media currently being played back.

MediaPlaybackTrait.Feature

Whether the server supports zero or more optional cluster features.

List<UInt>

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

Float?

The speed at which the current media is being played.

MediaPlaybackTrait.PlaybackPositionStruct?

The position of playback as of the specified time.

ULong?

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

ULong?

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

ULong?

The start time of the media, such as a livestream event, in UTC (ISO-8601) format.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: MediaPlayback.Attribute): Boolean

supports

fun supports(command: MediaPlayback.Command): Boolean

Public properties

factory

open val factoryTraitFactory<MediaPlayback>