Browse Source

fix index when on player2

master
jeffvli 3 years ago
parent
commit
98007565ec
  1. 2
      src/components/player/NowPlayingMiniView.tsx
  2. 2
      src/components/player/NowPlayingView.tsx
  3. 4
      src/components/player/Player.tsx

2
src/components/player/NowPlayingMiniView.tsx

@ -128,8 +128,10 @@ const NowPlayingMiniView = () => {
})
);
dispatch(setIsDragging(false));
if (playQueue.currentPlayer === 1) {
dispatch(fixPlayer2Index());
}
}
};
return (

2
src/components/player/NowPlayingView.tsx

@ -131,8 +131,10 @@ const NowPlayingView = () => {
})
);
dispatch(setIsDragging(false));
if (playQueue.currentPlayer === 1) {
dispatch(fixPlayer2Index());
}
}
};
if (!playQueue) {

4
src/components/player/Player.tsx

@ -518,7 +518,7 @@ const Player = ({ currentEntryList, children }: any, ref: any) => {
console.log('player error', e);
player1Ref.current.audioEl.current.src =
'./components/player/dummy.mp3';
// player1Ref.current.audioEl.current.src = getSrc1();
player1Ref.current.audioEl.current.src = getSrc1();
}}
crossOrigin="anonymous"
/>
@ -540,7 +540,7 @@ const Player = ({ currentEntryList, children }: any, ref: any) => {
console.log('player error', e);
player2Ref.current.audioEl.current.src =
'./components/player/dummy.mp3';
// player2Ref.current.audioEl.current.src = getSrc2();
player2Ref.current.audioEl.current.src = getSrc2();
}}
crossOrigin="anonymous"
/>

Loading…
Cancel
Save