---
title: mediaPlaybackRequiresUserAction
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiwebview/mediaplaybackrequiresuseraction
---

# mediaPlaybackRequiresUserAction

A Boolean value that determines whether HTML5 videos can play automatically or require the user to start playing them.

## Declaration

```swift
var mediaPlaybackRequiresUserAction: Bool { get set }
```

## Discussion

Discussion The default value on both iPad and iPhone is true. To make media play automatically when loaded, set this property to false and ensure the <audio> or <video> element you want to play has the autoplay attribute set.

## See Also

### Managing media playback

- [allowsInlineMediaPlayback](uikit/uiwebview/allowsinlinemediaplayback.md)
- [mediaPlaybackAllowsAirPlay](uikit/uiwebview/mediaplaybackallowsairplay.md)
- [allowsPictureInPictureMediaPlayback](uikit/uiwebview/allowspictureinpicturemediaplayback.md)
