Minimal working example
Opening the page will automatically do the following:
- Initialize the SDK
- Ask the user for camera permissions
- Load up the SDK
- Start emotion recognition
- Log the facial expression results to the console
var reConfig = {
accountHash: 'YOUR_ACCOUNT_HASH',
autoStart: true,
autoPreLoad: true,
};
window.Realeyesit.experienceSdk.init(reConfig);
/* Subscribe to facial expression result event */
window.Realeyesit.experienceSdk.on('facialExpressionsDetected', (params) => {
console.log(params);
});