react-h5-audio-player icon indicating copy to clipboard operation
react-h5-audio-player copied to clipboard

FR: Conditionally disable skip previous/next buttons

Open turnerhayes opened this issue 1 year ago • 0 comments
trafficstars

It would be nice to be able to set the skip previous/skip next buttons conditionally, so that if you're at the beginning of a playlist, the skip previous button is disabled, and if you're at the end of the playlist, the skip next button is disabled. It could be implemented as props on the player, similar to the onClickPrevious/onClickNext event handlers, e.g.

<AudioPlayer
  disablePrevious={currentIndex === 0}
  disableNext={currentIndex === playlistItems.length - 1}
/>

turnerhayes avatar Sep 05 '24 15:09 turnerhayes