pauseAllMediaPlayback method

  1. @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.pauseAllMediaPlayback', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3752240-pauseallmediaplayback', available: '15.0'), MacOSPlatform(apiName: 'WKWebView.pauseAllMediaPlayback', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3752240-pauseallmediaplayback', available: '12.0'), LinuxPlatform(apiName: 'JavaScript HTMLMediaElement.pause()', apiUrl: 'https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause', note: 'Uses JavaScript to pause all audio and video elements')])
Future<void> pauseAllMediaPlayback()

Pauses playback of all media in the web view.

Officially Supported Platforms/Implementations:

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    IOSPlatform(
      apiName: 'WKWebView.pauseAllMediaPlayback',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/3752240-pauseallmediaplayback',
      available: '15.0',
    ),
    MacOSPlatform(
      apiName: 'WKWebView.pauseAllMediaPlayback',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/3752240-pauseallmediaplayback',
      available: '12.0',
    ),
    LinuxPlatform(
      apiName: 'JavaScript HTMLMediaElement.pause()',
      apiUrl:
          'https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause',
      note: 'Uses JavaScript to pause all audio and video elements',
    ),
  ],
)
Future<void> pauseAllMediaPlayback() {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.pauseAllMediaPlayback.name} is not implemented on the current platform',
  );
}