Skip to main content

Feature Detector

Detect user agents capabilities in order to provide user friendly notifications, messages, and fallbacks instead of relying on browser identification techniques.

import { FeatureDetector } from '@eyeson/js';

FeatureDetector.canUseEyeson();
FeatureDetector.canScreenCapture();
FeatureDetector.inIframe();
FeatureDetector.hasMobileDevice();

The Feature Detector also provides lower level checks that are used in the library itself or to provide specific advises to an end-user. You propably won't need them, but for the sake of completeness:

FeatureDetector.canToggleCamera();
FeatureDetector.canFullscreen();
FeatureDetector.canPip();
FeatureDetector.canSFU();
FeatureDetector.canVirtualBackground();
FeatureDetector.canChangeAudioOutput();
FeatureDetector.canChooseDisplaySurface();
FeatureDetector.canVirtualBackground();

Capabilities Reference

The following table provides a comprehensive overview of all available feature detection capabilities:

MethodDescription
canUseEyeson()Checks if the browser has the minimum requirements to use the Eyeson SDK
canScreenCapture()Determines if the browser supports screen sharing functionality
inIframe()Detects if the application can run within an iframe
hasMobileDevice()Identifies if the user is on a mobile device
canToggleCamera()Checks if the browser supports camera toggling
canFullscreen()Determines if the browser supports fullscreen mode
canPip()Checks if Picture-in-Picture mode is supported
canSFU()Determines if Selective Forwarding Unit is supported for video routing
canVirtualBackground()Checks if virtual background features are supported
canChangeAudioOutput()Determines if changing audio output devices is supported
canChooseDisplaySurface()Checks if the browser allows selecting specific display surfaces for sharing