setAudioMuted method

Future<void> setAudioMuted({
  1. required bool muted,
})

Mutes or unmutes audio playback in this WebView.

On Android this maps to WebViewCompat.setAudioMuted when WebViewFeature.MUTE_AUDIO is supported. On iOS and macOS it maps to setAllMediaPlaybackSuspended.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • muted: all platforms

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

Implementation

Future<void> setAudioMuted({required bool muted}) =>
    platform.setAudioMuted(muted: muted);