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

# stop(_:)

Creates a command that stops media playback.

## Declaration

```swift
static func stop(_ action: @escaping () async throws -> Void) -> MediaCommand
```

## Parameters

- `action`: The closure the system calls to stop playback.

## See Also

### Controlling playback

- [play(_:)](nowplaying/mediacommand/play(_:).md)
- [pause(_:)](nowplaying/mediacommand/pause(_:).md)
- [togglePlayPause(_:)](nowplaying/mediacommand/toggleplaypause(_:).md)
