closeAllMediaPresentations method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.closeAllMediaPresentations', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3752235-closeallmediapresentations', available: '14.5'), MacOSPlatform(apiName: 'WKWebView.closeAllMediaPresentations', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3752235-closeallmediapresentations', available: '11.3'), LinuxPlatform(apiName: 'JavaScript Document.exitFullscreen()/exitPictureInPicture()', apiUrl: 'https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen', note: 'Uses JavaScript to exit fullscreen and picture-in-picture modes')])
inherited
Closes all media the web view is presenting, including picture-in-picture video and fullscreen video.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'WKWebView.closeAllMediaPresentations',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3752235-closeallmediapresentations',
available: '14.5',
),
MacOSPlatform(
apiName: 'WKWebView.closeAllMediaPresentations',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3752235-closeallmediapresentations',
available: '11.3',
),
LinuxPlatform(
apiName: 'JavaScript Document.exitFullscreen()/exitPictureInPicture()',
apiUrl:
'https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen',
note: 'Uses JavaScript to exit fullscreen and picture-in-picture modes',
),
],
)
Future<void> closeAllMediaPresentations() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.closeAllMediaPresentations.name} is not implemented on the current platform',
);
}