setAllMediaPlaybackSuspended method

Future<void> setAllMediaPlaybackSuspended({
  1. required bool suspended,
})

Changes whether the webpage is suspending playback of all media in the page. Pass true to pause all media the web view is playing. Neither the user nor the webpage can resume playback until you call this method again with false.

suspended represents a bool value that indicates whether the webpage should suspend media playback.

NOTE for iOS: available on iOS 15.0+.

NOTE for MacOS: available on MacOS 12.0+.

Officially Supported Platforms/Implementations:

Implementation

Future<void> setAllMediaPlaybackSuspended({required bool suspended}) =>
    platform.setAllMediaPlaybackSuspended(suspended: suspended);