Documentation Index
Fetch the complete documentation index at: https://ansdevcloud.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Events
The Player SDK emits 5 lifecycle events. React consumers wire them as callback props; Web Component consumers listen for DOM events that bubble out of the Shadow Root.| Event | React prop | Detail payload |
|---|---|---|
ansdev:ready | onReady | (durationSec: number) |
ansdev:play | onPlay | — |
ansdev:pause | onPause | — |
ansdev:ended | onEnded | — |
ansdev:error | onError | ({ code: string, message: string }) |
React
Web Component
bubble: true and composed: true, so you can also listen on an ancestor (e.g. document.addEventListener('ansdev:play', …)).
Error codes
The same set you’d see in API responses, plus one client-side code:| Code | When |
|---|---|
INIT_ERROR | Generic init failure (network, hls.js setup, etc.). |
INVALID_API_KEY | API rejected the key — rotate. |
RATE_LIMIT_EXCEEDED | API key daily token quota hit. |
VIDEO_NOT_FOUND | Video doesn’t exist or isn’t yours. |
VIDEO_NOT_READY | Transcoding still in flight. |