ReferenceMedia
LazyAudio
UnstableAudio media that picks the media component for its source and loads only that component's code
The audio counterpart of LazyVideo: reads src, renders the media component that plays it, and loads that component’s code only once the source is known.
Import
Sources
A source that matches none of these, including YouTube, Vimeo, and DASH, renders nothing and logs an error in development.
Custom media
createLazyAudio builds a LazyAudio from a list of media, tried in order, the same way createLazyVideo does. The built-in media are audio, hlsAudio, muxAudio, spotifyAudio, soundcloudAudio, and mixcloudAudio, each imported from @videojs/react/media/lazy/ plus its kebab-case name.
LazyAudio takes the same src, type, preferPlayback, and preload options as LazyVideo, and loads and passes props on the same way. See LazyVideo for its behavior and API reference.