setMicrophoneCaptureState method
- required MediaCaptureState state,
Changes whether the webpage is using the microphone to capture audio.
Officially Supported Platforms/Implementations:
- iOS WKWebView 15.0+ (Official API - WKWebView.setMicrophoneCaptureState)
- Linux WPE WebKit 2.34+ (Official API - webkit_web_view_set_microphone_capture_state):
- Once state is set to NONE, it cannot be changed back. The page can request capture again using the mediaDevices API.
- macOS WKWebView 12.0+ (Official API - WKWebView.setMicrophoneCaptureState)
Parameters - Officially Supported Platforms/Implementations:
state: all platforms
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<void> setMicrophoneCaptureState({required MediaCaptureState state}) =>
platform.setMicrophoneCaptureState(state: state);