---
title: "nowPlayingSessionDidChangeActive(_:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpnowplayingsessiondelegate/nowplayingsessiondidchangeactive(_:)"
---

# nowPlayingSessionDidChangeActive(_:)

Tells the delegate that the session changed its active status.

## Declaration

```swift
optional func nowPlayingSessionDidChangeActive(_ nowPlayingSession: MPNowPlayingSession)
```

## Parameters

- `nowPlayingSession`: The Now Playing session that changed.

## See Also

### Related Documentation

- [isActive](mediaplayer/mpnowplayingsession/isactive.md)

### Responding to state changes

- [nowPlayingSessionDidChangeCanBecomeActive(_:)](mediaplayer/mpnowplayingsessiondelegate/nowplayingsessiondidchangecanbecomeactive(_:).md)
