react-h5-audio-player
react-h5-audio-player copied to clipboard
FR: Conditionally disable skip previous/next buttons
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}
/>