Video Recording
The Facephi Video Provider component offers recording of the process carried out on different widgets such as SelphID and Selphi.
The facephi-video-provider is a key web component of the SDK Web, enabling real-time video recording of the onboarding or authentication process. It is compatible with real-time streaming modes (ws, sse) as well as a browser-only local recording mode (serviceType: 'local').
As a provider, you must wrap the components you want to record.
Type: HTMLFacephiVideoProviderElement
How It Works
The facephi-video-provider provides smooth video recording by capturing interactions and processes during authentication or onboarding. Wrapping it around the components ensures that all activities are included in the recording.
Recording types
Recording can be performed in different ways:
Remote recording (default)
The tool will use WebSocket services (ws) or Server-Sent Events (sse) for recording.
Example of Integration
The widgets must be integrated inside the Video Provider tag once it has fully loaded.
<facephi-video-provider
settings={{ serviceType: 'ws' }}
onChangeLoading={(event) => {
if (!event.detail) {
// Start Facephi widget flow
}
}}
/>The Video Provider must be stopped once the extraction process has completed.
For video retrieval, see the section of Video Provider results.
Local recording
The component <facephi-video-provider> supports a mode of local recording that captures video entirely in the browser using the MediaRecorder API. Unlike the default WebSocket service types (ws) or Server-Sent Events (sse), local recording does not stream video to an external server during capture. Instead, the recorded video remains client-side and is returned as a Blob when recording stops.
The recorded video is still automatically sent through the SDK tracking pipeline (trackingAsset with MIME type video/mp4), so it integrates seamlessly with downstream processing.
Once <facephi-video-provider> is rendered in the DOM with settings.serviceType set to 'local', the component immediately starts the recording pipeline: it initializes the camera stack, calls getUserMedia and the browser requests the required permissions from the user (camera and microphone when audioEnabled is true). No additional start call is needed: rendering the provider is enough to begin recording.
The generated video can be obtained by calling the method stopVideo() of the component, which will return a Blob.
Browser compatibility
Local recording is based on the MediaRecorder API, which is compatible with all modern browsers (Chrome, Firefox, Safari 14.5+, Edge). The component automatically selects the best video codec available for the current browser.
In Chrome/Edge 94+, the component uses Insertable Streams for higher-fidelity frame processing (e.g. timer overlays) without an intermediate canvas layer. This is detected and used automatically with no configuration required.
Permissions
The user must grant camera permissions camera. If audioEnabled is true (the default value), microphone permission is also required microphone. The component internally handles the call getUserMedia.
Proxy configuration
If you are routing SDK requests through a forwarding proxy, you must configure the property proxy in <facephi-sdk-provider> so that the camera module can load its required assets. See the property proxy of the SDK provider and the proxy configuration guide for configuration details.
Licensing
The local recording mode does not require a video recording license. When serviceType is set to "local", the component skips the license validation required by the modes ws and sse.
Example of Integration
The widgets must be integrated inside the Video Provider tag once it has fully loaded.
For video retrieval, see the section of Video Provider results.
Differences between WS and SSE modes
Server infrastructure
Not required for recording
Requires baseUrl and apiKey
Video recording license
Not required
Required
Video output
Blob returned client-side via stopVideo()
Streamed to the server in real time
Codec selection
Automatic (best available: VP8, VP9, H.264, AV1)
Determined by the server
Timer overlay
Optional (videoTimer: true)
Not available
Camera switching
Supported (continuous recording maintained)
Supported
Tracking integration
Automatic (sent after stopVideo())
Automatic (in real time)
Troubleshooting
Camera permission denied
If the user denies access to the camera or microphone, the component emits an error through the SDK error pipeline (SDKErrorType.VideoProviderError). Listen to the event emitError in <facephi-sdk-provider> to handle it in your application.
Unsupported MIME type
On very old browsers that do not support any of the tested codecs (VP8, VP9, H.264, AV1, H.265), MediaRecorder will fall back to the browser's default codec. If no codec is supported, a recording error will be emitted.
Failed to switch camera
When cameraSwitch is set to true and the initial camera request fails (common on devices with restricted permissions), the component will automatically retry with cameraSwitch disabled. If both attempts fail, an error is emitted. Check the messages [LocalRecording] in the browser console.
Debug logging
Configure showLog={true} in <facephi-video-provider> to enable detailed console output. Look for messages with the prefix [LocalRecorder] to trace the recording lifecycle:
Engine initialization (resolution, FPS, quality, pipeline selection)
Recording start (codec, bitrate, frame scheduling method)
Camera change events
Video generation (file size, duration, number of chunks)
Engine deinitialization
Configuration
The Video Provider component is configured via JSX or JavaScript properties.
PropertiesThe Video Provider component will emit events during its lifecycle.
EventsSome functions are provided with the component to offer additional utilities.
MethodsHow to obtain the recorded video from the extraction after the extraction process.
ResultsBenefits of using Video Provider
Performance improvement in video processes.
Advanced configuration of technical parameters.
Optimal compatibility with devices and browsers.
When to use Video Provider?
Whenever you implement VideoID in your application.
When you need to control or customize the video experience.
To ensure technical compatibility in diverse environments.
Next steps
Review:
Video Provider usage examples.
Advanced configuration options.
Best practices for video processes.
Last updated