getMicrophoneCaptureState method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.microphoneCaptureState', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3763096-microphonecapturestate', available: '15.0'), LinuxPlatform(apiName: 'webkit_web_view_get_microphone_capture_state', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.get_microphone_capture_state.html', available: '2.34'), MacOSPlatform(apiName: 'WKWebView.microphoneCaptureState', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3763096-microphonecapturestate', available: '12.0')])
Returns a MediaCaptureState that indicates whether the webpage is using the microphone to capture audio.
Officially Supported Platforms/Implementations:
- iOS WKWebView 15.0+ (Official API - WKWebView.microphoneCaptureState)
- Linux WPE WebKit 2.34+ (Official API - webkit_web_view_get_microphone_capture_state)
- macOS WKWebView 12.0+ (Official API - WKWebView.microphoneCaptureState)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'WKWebView.microphoneCaptureState',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3763096-microphonecapturestate',
available: '15.0',
),
LinuxPlatform(
apiName: 'webkit_web_view_get_microphone_capture_state',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.get_microphone_capture_state.html',
available: '2.34',
),
MacOSPlatform(
apiName: 'WKWebView.microphoneCaptureState',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3763096-microphonecapturestate',
available: '12.0',
),
],
)
Future<MediaCaptureState?> getMicrophoneCaptureState() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.getMicrophoneCaptureState.name} is not implemented on the current platform',
);
}