Browse Source

fix index when on player2

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

4
src/components/player/NowPlayingMiniView.tsx

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

4
src/components/player/NowPlayingView.tsx

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

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