Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giving a null issue onDestroy #544

Open
Prasundas99 opened this issue Jan 30, 2024 · 0 comments
Open

Giving a null issue onDestroy #544

Prasundas99 opened this issue Jan 30, 2024 · 0 comments

Comments

@Prasundas99
Copy link

Prasundas99 commented Jan 30, 2024

Version

"react-jinke-music-player": "^4.24.2",
"react": "^18.2.0",

Description

Getting this error when i destory a player using the (X) cross button and then play a new song

image

const MusicPlayer = ({ audioLists = [], currentSongIndex = "" }) => {
  const playIndex = audioLists.findIndex(
    (song) => song.id === currentSongIndex
  );
  return (
    <ReactJkMusicPlayer
      audioLists={audioLists ?? []}
      mode="full"
      theme="dark"
      autoPlay={true}
      toggleMode={false}
      showThemeSwitch={false}
      showDownload={false}
      showReload={false}
      playIndex={playIndex ?? 0}
      showDestroy={true}
    />
  );
};

Expected Behavior

It should play the new song

Current Behavior

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant