---
title: "changePlaybackRate(supported:_:)"
framework: nowplaying
role: symbol
role_heading: Type Method
path: "nowplaying/mediacommand/changeplaybackrate(supported:_:)"
---

# changePlaybackRate(supported:_:)

Creates a command that changes the playback rate of the media.

## Declaration

```swift
static func changePlaybackRate(supported: [Float], _ action: @escaping (Float) async throws -> Void) -> MediaCommand
```

## Parameters

- `supported`: An array of playback rates your app can play at.
- `action`: The closure the system calls to change the playback rate.

## See Also

### Changing playback modes

- [changeRepeatMode(current:supported:_:)](nowplaying/mediacommand/changerepeatmode(current:supported:_:).md)
- [changeShuffleMode(current:supported:_:)](nowplaying/mediacommand/changeshufflemode(current:supported:_:).md)
- [MediaCommand.RepeatMode](nowplaying/mediacommand/repeatmode.md)
- [MediaCommand.ShuffleMode](nowplaying/mediacommand/shufflemode.md)
