---
title: "pauseAllMediaPlayback(completionHandler:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebview/pauseallmediaplayback(completionhandler:)"
---

# pauseAllMediaPlayback(completionHandler:)

Pauses playback of all media in the web view.

## Declaration

```swift
func pauseAllMediaPlayback(completionHandler: (@MainActor @Sendable () -> Void)? = nil)
```

```swift
func pauseAllMediaPlayback() async
```

## Parameters

- `completionHandler`: A closure the system executes after the web view pauses media playback.

## See Also

### Interacting with media

- [requestMediaPlaybackState(completionHandler:)](webkit/wkwebview/requestmediaplaybackstate(completionhandler:).md)
- [setAllMediaPlaybackSuspended(_:completionHandler:)](webkit/wkwebview/setallmediaplaybacksuspended(_:completionhandler:).md)
- [closeAllMediaPresentations(completionHandler:)](webkit/wkwebview/closeallmediapresentations(completionhandler:).md)
- [WKMediaPlaybackState](webkit/wkmediaplaybackstate.md)
