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

# enabled(_:)

Sets the enabled state for this command.

## Declaration

```swift
func enabled(_ isEnabled: Bool) -> MediaCommand
```

## Parameters

- `isEnabled`: If true, the command is enabled; if false, the command is disabled.

## Mentioned in

Publishing media sessions

## See Also

### Creating commands

- [MediaCommand](nowplaying/mediacommand.md)
