useAudio
Play a sound and track its playback state without rendering an audio element. Use it for notification sounds, previews and simple players.
- Level
- Intermediate
- Since
- v1.0.0
import {useAudio} from '@zenuilabs/react-hooks';Loading demo_
More in Media
MediaIntermediateuseFullscreenShow one element in fullscreen mode and track whether it is there. Works with the prefixed API in older Safari.MediaIntermediateuseSpeechSynthesisReads text aloud with the Web Speech API. Loads the voice list, which arrives asynchronously, and tracks speaking and paused state.MediaIntermediateuseVideoControl a video and track its playback state. Attach videoRef to a video element to show it, or leave it unattached to control a hidden one.