<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 10.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotificationsUI",
  "identifier" : "/documentation/UserNotificationsUI/UNNotificationContentExtension/mediaPlayPauseButtonFrame",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "User Notifications UI"
    ],
    "preciseIdentifier" : "c:objc(pl)UNNotificationContentExtension(py)mediaPlayPauseButtonFrame"
  },
  "title" : "mediaPlayPauseButtonFrame"
}
-->

# mediaPlayPauseButtonFrame

The frame rectangle to use for displaying a media playback button.

```
optional var mediaPlayPauseButtonFrame: CGRect { get }
```

## Discussion

If you support the playback of media directly from your notification
interface, implement this property and use it to return a nonempty rectangle
specified in the coordinate system of your view controller’s view. The
system draws a button in the provided rectangle that lets the user play and
pause your media content. The system handles the drawing of the button for
you and calls the [`mediaPlay()`](/documentation/UserNotificationsUI/UNNotificationContentExtension/mediaPlay()) and
[`mediaPause()`](/documentation/UserNotificationsUI/UNNotificationContentExtension/mediaPause()) methods in response to user
interactions. You can place this button anywhere in your view controller’s
view.

If you don’t implement this property, the system doesn’t draw a media
playback button.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)