Events
Events emitted by the Selphi Widget component.
The Selphi Widget emits events during its lifecycle.
Event format
facephi-selphi-widget wraps the internal engine facephi-selphi. When the engine emits an event, the wrapper forwards it, passing the CustomEvent internal as detail of the external event. That is why the widget's useful payload is in event.detail.detail, not in event.detail.
// Structure of the event received in <facephi-selphi-widget>
widgetEvent = {
detail: { // Internal CustomEvent forwarded by the wrapper
detail: { ... } // Real payload (ExtractionFinishDetail, etc.)
}
};
const payload = widgetEvent.detail.detail;Usage example
<facephi-selphi-widget
onExtractionFinish={(event) => {
const payload = event.detail.detail;
console.log('SELPHI RESULT:', payload);
}}
/>Events emitted by Selphi Widget
Extraction results
extractionFinish: Facial extraction has completed successfully.
User interaction
timeoutErrorButtonClick: The user pressed the button in the Timeout or error view.
userCancel: The user canceled the process.
Timers
extractionTimeout: The extraction time limit was reached.
moduleLoaded: The widget has finished loading.
Error handling
errorTimeout: Time expired in the terminal error view.
exceptionCaptured: An exception occurred during execution.
maxAttemptsExceeded: The allowed capture attempts were exhausted.
Extraction process
stabilizing: Frame analyzed during stabilization.
trackStatus: Internal state change during capture.
Last updated