---
title: mediaPlayPauseButtonFrame
framework: usernotificationsui
role: symbol
role_heading: Instance Property
path: usernotificationsui/unnotificationcontentextension/mediaplaypausebuttonframe
---

# mediaPlayPauseButtonFrame

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

## Declaration

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

## Mentioned in

Customizing the Appearance of Notifications

## Discussion

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() and 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.

## See Also

### Supporting Media Playback

- [mediaPlayPauseButtonType](usernotificationsui/unnotificationcontentextension/mediaplaypausebuttontype.md)
- [UNNotificationContentExtensionMediaPlayPauseButtonType](usernotificationsui/unnotificationcontentextensionmediaplaypausebuttontype.md)
- [mediaPlayPauseButtonTintColor](usernotificationsui/unnotificationcontentextension/mediaplaypausebuttontintcolor.md)
- [mediaPlay()](usernotificationsui/unnotificationcontentextension/mediaplay().md)
- [mediaPause()](usernotificationsui/unnotificationcontentextension/mediapause().md)
