CAMERA property
final
Resource belongs to video capture device, like camera.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - PermissionRequest.RESOURCE_VIDEO_CAPTURE)
- iOS WKWebView 15.0+ (Official API - WKMediaCaptureType.camera)
- macOS WKWebView 12.0+ (Official API - WKMediaCaptureType.camera)
- Windows WebView2 (Official API - COREWEBVIEW2_PERMISSION_KIND_CAMERA)
Implementation
static final CAMERA = PermissionResourceType._internalMultiPlatform(
'CAMERA',
() {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return 'android.webkit.resource.VIDEO_CAPTURE';
case TargetPlatform.iOS:
return 0;
case TargetPlatform.macOS:
return 0;
case TargetPlatform.windows:
return 2;
default:
break;
}
return null;
},
);