isSupported static method
- MediasfuFeature feature
Checks if a specific feature is supported on the current platform.
Returns true if the feature is supported, false otherwise.
Implementation
static bool isSupported(MediasfuFeature feature) {
switch (feature) {
case MediasfuFeature.screenboard:
// Screenboard (screen annotation) is only supported on web
return kIsWeb;
case MediasfuFeature.virtualBackgrounds:
// Virtual backgrounds supported on:
// - iOS: MediaPipe TFLite
// - Android: Google MediaPipe
// - macOS: Apple Vision
// Windows support is disabled pending a viable frame-injection path.
return isMobile || isMacOS;
case MediasfuFeature.screenShare:
// Screen sharing is supported on all platforms with platform-specific implementations:
// - Web: getDisplayMedia
// - Android: MediaProjection with foreground service
// - iOS: Broadcast Extension
// - Desktop: flutter_webrtc desktop capturer
return true;
case MediasfuFeature.whiteboard:
// Whiteboard is supported on all platforms
return true;
}
}