Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Utility for creating well-formed player event payloads.
id
createdAt
status
initiatedBy
npx @beyondwords/cli components add new-event --html
pnpm dlx @beyondwords/cli components add new-event --html
yarn dlx @beyondwords/cli components add new-event --html
bunx --bun @beyondwords/cli components add new-event --html
import { newEvent } from "@/lib/newEvent"; player.onEvent( newEvent({ type: "PressedPlay", description: "The play button was pressed.", }), ); // => { id, createdAt, status: 'pending', initiatedBy: 'user', type, description }
Was this page helpful?