setMicrophoneCaptureState method

  1. @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.setMicrophoneCaptureState', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3763098-setmicrophonecapturestate', available: '15.0'), LinuxPlatform(apiName: 'webkit_web_view_set_microphone_capture_state', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.set_microphone_capture_state.html', available: '2.34', note: 'Once state is set to NONE, it cannot be changed back. The page can request capture again using the mediaDevices API.'), MacOSPlatform(apiName: 'WKWebView.setMicrophoneCaptureState', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3763098-setmicrophonecapturestate', available: '12.0')])
Future<void> setMicrophoneCaptureState({
  1. required MediaCaptureState state,
})

Changes whether the webpage is using the microphone to capture audio.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • state: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    IOSPlatform(
      apiName: 'WKWebView.setMicrophoneCaptureState',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/3763098-setmicrophonecapturestate',
      available: '15.0',
    ),
    LinuxPlatform(
      apiName: 'webkit_web_view_set_microphone_capture_state',
      apiUrl:
          'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.set_microphone_capture_state.html',
      available: '2.34',
      note:
          'Once state is set to NONE, it cannot be changed back. The page can request capture again using the mediaDevices API.',
    ),
    MacOSPlatform(
      apiName: 'WKWebView.setMicrophoneCaptureState',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/3763098-setmicrophonecapturestate',
      available: '12.0',
    ),
  ],
)
Future<void> setMicrophoneCaptureState({required MediaCaptureState state}) {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.setMicrophoneCaptureState.name} is not implemented on the current platform',
  );
}