Skip to Content
npm i @clxrity/react-audio

ShufflePlayer

The <ShufflePlayer /> component is built off of the Player component, adding the ability to play multiple audio files.


"use client"; import { ShufflePlayer } from "@clxrityy/react-audio"; export default function Example() { return ( <ShufflePlayer srcs={[ "/audio/strings.wav", "/audio/drums_2.wav", "/audio/drums.wav", ]} /> ); }


Props



PropertyTypeDescriptionRequiredDefault Value
srcsstring[]An array of source URLs for the audio files.✅undefined
autoplaybooleanWhether the audio should start playing automatically.❌false
colorstringThe color of the player.❌rgb(236, 106, 177)
showNextPrevControlsbooleanWhether to show the next and previous controls.❌true
showProgressbooleanWhether to show the progress bar.❌true
showVolumebooleanWhether to show the volume control.❌true
shufflebooleanWhether to shuffle the audio files. If true, a random file will be played each time.❌false
Last updated on

ShufflePlayer