prevent change of media state with empty queue

This commit is contained in:
Kendall Garner 2024-04-20 22:01:29 -07:00
parent ba531505af
commit 0d03b66fe5
No known key found for this signature in database
GPG key ID: 18D2767419676C87
5 changed files with 26 additions and 11 deletions

View file

@ -508,7 +508,7 @@ export const useCenterControls = (args: { playersRef: any }) => {
]);
const handlePlayPause = useCallback(() => {
if (queue) {
if (queue.length > 0) {
if (playerStatus === PlayerStatus.PAUSED) {
return handlePlay();
}