---
title: togglePlayPauseCommand
framework: mediaplayer
role: symbol
role_heading: Instance Property
path: mediaplayer/mpremotecommandcenter/toggleplaypausecommand
---

# togglePlayPauseCommand

The command object for toggling between playing and pausing the current item.

## Declaration

```swift
var togglePlayPauseCommand: MPRemoteCommand { get }
```

## Discussion

Discussion Use the object in this property to register your app’s handler for toggling between playing and pausing the current track. In your handler, perform the appropriate task based on the current state of the media item. If the item is currently playing, pause it. If it is paused, resume playing it. You can disable the command if your app does not support it.

## See Also

### Playback commands

- [pauseCommand](mediaplayer/mpremotecommandcenter/pausecommand.md)
- [playCommand](mediaplayer/mpremotecommandcenter/playcommand.md)
- [stopCommand](mediaplayer/mpremotecommandcenter/stopcommand.md)
