{"version":"1.0","type":"rich","title":"Hook that plays an audio file from a source URL.","description":"This example demonstrates a React hook that controls audio playback from a URL, triggered by a boolean flag and configurable volume and loop settings. The hook creates an `Audio` object via the browser’s Web Audio API and manages its lifecycle with `useEffect`, playing when the flag is true and pausing on cleanup. It also listens for the `ended` event to invoke an optional completion callback. The code relies on React’s `useMemo` and `useEffect` hooks, showing a declarative approach to embedding sound in a visualization without visible UI.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-d3484a659ea815baac95e0f23c090d88?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}