<!--
{
  "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/mediaPlay()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "User Notifications UI"
    ],
    "preciseIdentifier" : "c:objc(pl)UNNotificationContentExtension(im)mediaPlay"
  },
  "title" : "mediaPlay()"
}
-->

# mediaPlay()

Tells you to begin playback of your media content.

```
optional func mediaPlay()
```

## Discussion

Don’t call this method yourself. If you implement the
[`mediaPlayPauseButtonFrame`](/documentation/UserNotificationsUI/UNNotificationContentExtension/mediaPlayPauseButtonFrame) property in
your view controller, the system calls this method when the user wants to
begin playback of your media. Use your implementation of this method to
initiate playback.

---

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)