Methods
# async analyzeVideo(videoElement, videoId) → {Promise.<void>}
Analyze video for emotions and engagement
Parameters:
| Name | Type | Description |
|---|---|---|
videoElement |
HTMLVideoElement
|
Video element to analyze |
videoId |
string
|
Unique identifier for this video |
Promise.<void>
# async canDetectFaces(videoElementopt) → {Object}
Check if detection is possible
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
videoElement |
HTMLVideoElement
|
<optional> |
null |
Detection capability
Object
# getModelInfo() → {Object}
Get detailed information about loaded models and configuration
Detailed model and environment info
Object
# async initialize() → {Promise.<void>}
Initialize Human.js with automatic backend detection
Promise.<void>
# async static detectOptimalBackend() → {Promise.<{backend: string, reason: string}>}
Detect the optimal backend for the current environment Priority: webgpu > webgl > wasm > cpu
Promise.<{backend: string, reason: string}>
# async static isWebGPUAvailable() → {Promise.<boolean>}
Check if WebGPU is available in the current environment
Promise.<boolean>