struct MediaPlaybackTraitThis 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.
- 
                  
                  List of the event types that are supported by MediaPlaybackTrait.DeclarationSwift static let supportedEventTypes: [any Event.Type]
- 
                  
                  List of the commands that are supported by MediaPlaybackTrait.DeclarationSwift static let supportedCommandTypes: [any Command.Type]
- 
                  
                  The trait identifier. DeclarationSwift static let identifier: String
- 
                  
                  Metadata about this Trait.DeclarationSwift let metadata: TraitMetadata
- 
                  
                  List of attributes for the MediaPlaybackTrait.DeclarationSwift let attributes: Matter.MediaPlaybackTrait.Attributes
- 
                  
                  Creates a new Trait instance using data read from the given TraitDecoder.Throws HomeError.parseErrorwhen parsing fails.DeclarationSwift init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throwsParametersdecoderThe raw data representing this Trait. interactionProxyProxy to the Interaction Client. metadataMetadata about this Trait. 
- 
                  
                  Writes this object to the given TraitEncoder. ThrowsHomeError.encodingFailedif the data could not be encoded.DeclarationSwift func encode(with encoder: TraitEncoder) throws
- 
                  
                  This API provides the ability to invalidate state retrieved through subscriptions to the target device in the cases where state is not being reported correctly, either intentionally (e.g attributes in Matter traits with the “C” quality) or unintentionally due to poor implementations. When successful, this API will result in a forced read of the convening scope as specified by the sub-class and return the result through existing Trait subscriptions if present and active. This API is to be used sparingly as it can impact the performance and battery life of the target device. As such, this API may be throttled by the platform. Callers SHALL be prepared to deal with HomeErrors thrown by this call.DeclarationSwift func forceRead() async throws
- 
                  
                  Attributes for the MediaPlaybackTrait.DeclarationSwift struct Attributes
- 
                  
                  Returns a Boolean value indicating whether two values are equal. Equality is the inverse of inequality. For any values aandb,a == bimplies thata != bisfalse.DeclarationParameterslhsA value to compare. rhsAnother value to compare. 
- 
                  
                  Hashes the essential components of this value by feeding them into the given hasher. Implement this method to conform to the Hashableprotocol. The components used for hashing must be the same as the components compared in your type’s==operator implementation. Callhasher.combine(_:)with each of these components.Important In your implementation of hash(into:), don’t callfinalize()on thehasherinstance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.DeclarationSwift func hash(into hasher: inout Hasher)
- 
                  
                  A playback position within a media stream. DeclarationSwift struct PlaybackPositionStruct
- 
                  
                  Whether the device supports the playcommand for this trait.DeclarationSwift var supportsPlayCommand: Bool { get }
- 
                  
                  Play the current media. DeclarationSwift func play() async throws -> Matter.MediaPlaybackTrait.PlayCommandResponseReturn ValueThe outcome of the Playcommand.
- 
                  
                  The batchable version of play command above. See also playDeclarationSwift func playBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.PlayCommandResponse>
- 
                  
                  Whether the device supports the pausecommand for this trait.DeclarationSwift var supportsPauseCommand: Bool { get }
- 
                  
                  Pause the current media. DeclarationSwift func pause() async throws -> Matter.MediaPlaybackTrait.PauseCommandResponseReturn ValueThe outcome of the Pausecommand.
- 
                  
                  The batchable version of pause command above. See also pauseDeclarationSwift func pauseBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.PauseCommandResponse>
- 
                  
                  Whether the device supports the stopcommand for this trait.DeclarationSwift var supportsStopCommand: Bool { get }
- 
                  
                  Stop playing the current media. DeclarationSwift func stop() async throws -> Matter.MediaPlaybackTrait.StopCommandResponseReturn ValueThe outcome of the Stopcommand.
- 
                  
                  The batchable version of stop command above. See also stopDeclarationSwift func stopBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.StopCommandResponse>
- 
                  
                  Whether the device supports the startOvercommand for this trait.DeclarationSwift var supportsStartOverCommand: Bool { get }
- 
                  
                  Start over from the beginning of the current media. DeclarationSwift func startOver() async throws -> Matter.MediaPlaybackTrait.StartOverCommandResponseReturn ValueThe outcome of the StartOvercommand.
- 
                  
                  The batchable version of startOver command above. See also startOverDeclarationSwift func startOverBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.StartOverCommandResponse>
- 
                  
                  Whether the device supports the previouscommand for this trait.DeclarationSwift var supportsPreviousCommand: Bool { get }
- 
                  
                  Move to the previous item in the current media. DeclarationSwift func previous() async throws -> Matter.MediaPlaybackTrait.PreviousCommandResponseReturn ValueThe outcome of the Previouscommand.
- 
                  
                  The batchable version of previous command above. See also previousDeclarationSwift func previousBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.PreviousCommandResponse>
- 
                  
                  Whether the device supports the nextcommand for this trait.DeclarationSwift var supportsNextCommand: Bool { get }
- 
                  
                  Move to the next item in the media. DeclarationSwift func next() async throws -> Matter.MediaPlaybackTrait.NextCommandResponseReturn ValueThe outcome of the Nextcommand.
- 
                  
                  The batchable version of next command above. See also nextDeclarationSwift func nextBatchable() throws -> BatchableCommand<Matter.MediaPlaybackTrait.NextCommandResponse>
- 
                  
                  Whether the device supports the rewindcommand for this trait.DeclarationSwift var supportsRewindCommand: Bool { get }
- 
                  
                  Whether the device supports the fastForwardcommand for this trait.DeclarationSwift var supportsFastForwardCommand: Bool { get }
- 
                  
                  Whether the device supports the skipForwardcommand for this trait.DeclarationSwift var supportsSkipForwardCommand: Bool { get }
- 
                  
                  Skip forward by a specified amount of time within the current media. DeclarationSwift func skipForward(deltaPositionMilliseconds: UInt64) async throws -> Matter.MediaPlaybackTrait.SkipForwardCommandResponseParametersdeltaPositionMillisecondsThe duration of the time span to skip forward in the media, in milliseconds. Return ValueThe outcome of the SkipForwardcommand.
- 
                  
                  The batchable version of skipForward command above. See also skipForwardDeclarationSwift func skipForwardBatchable(deltaPositionMilliseconds: UInt64) throws -> BatchableCommand<Matter.MediaPlaybackTrait.SkipForwardCommandResponse>
- 
                  
                  Whether the device supports the skipBackwardcommand for this trait.DeclarationSwift var supportsSkipBackwardCommand: Bool { get }
- 
                  
                  Skip backward by a specified amount of time within the current media. DeclarationSwift func skipBackward(deltaPositionMilliseconds: UInt64) async throws -> Matter.MediaPlaybackTrait.SkipBackwardCommandResponseParametersdeltaPositionMillisecondsThe duration of the time span to skip backward in the media, in milliseconds. Return ValueThe outcome of the SkipBackwardcommand.
- 
                  
                  The batchable version of skipBackward command above. See also skipBackwardDeclarationSwift func skipBackwardBatchable(deltaPositionMilliseconds: UInt64) throws -> BatchableCommand<Matter.MediaPlaybackTrait.SkipBackwardCommandResponse>
- 
                  
                  Whether the device supports the seekcommand for this trait.DeclarationSwift var supportsSeekCommand: Bool { get }
- 
                  
                  Change the playback position in the current media to the specified position. DeclarationSwift func seek(position: UInt64) async throws -> Matter.MediaPlaybackTrait.SeekCommandResponseParameterspositionThe position to seek to, relative to the start of the media, in milliseconds. Return ValueThe outcome of the Seekcommand.
- 
                  
                  The batchable version of seek command above. See also seekDeclarationSwift func seekBatchable(position: UInt64) throws -> BatchableCommand<Matter.MediaPlaybackTrait.SeekCommandResponse>
- 
                  
                  Whether the device supports the activateAudioTrackcommand for this trait.DeclarationSwift var supportsActivateAudioTrackCommand: Bool { get }
- 
                  
                  The batchable version of activateAudioTrack command above. See also activateAudioTrackDeclarationSwift func activateAudioTrackBatchable(trackID: String, audioOutputIndex: UInt8) throws -> BatchableCommand<Void>
- 
                  
                  Whether the device supports the activateTextTrackcommand for this trait.DeclarationSwift var supportsActivateTextTrackCommand: Bool { get }
- 
                  
                  The batchable version of activateTextTrack command above. See also activateTextTrackDeclarationSwift func activateTextTrackBatchable(trackID: String) throws -> BatchableCommand<Void>
- 
                  
                  Whether the device supports the deactivateTextTrackcommand for this trait.DeclarationSwift var supportsDeactivateTextTrackCommand: Bool { get }
- 
                  
                  The batchable version of deactivateTextTrack command above. See also deactivateTextTrackDeclarationSwift func deactivateTextTrackBatchable() throws -> BatchableCommand<Void>
- 
                  
                  Playback states. DeclarationSwift enum PlaybackStateEnum
- 
                  
                  Playback statuses. DeclarationSwift enum StatusEnum
- 
                  
                  The MediaPlayback cluster FeatureMap. DeclarationSwift struct Feature