displays stopped when track finished
This commit is contained in:
parent
2764bb60c8
commit
2fff0b7be0
1 changed files with 1 additions and 0 deletions
|
@ -95,6 +95,7 @@ export const play = (player: number): AppThunk => dispatch => {
|
|||
try{
|
||||
playerSources[player].mediaElement.play();
|
||||
dispatch(playerState.actions.setPlayerState({ player, state: "playing" }));
|
||||
playerSources[player].mediaElement.addEventListener("ended", function(){dispatch(playerState.actions.setPlayerState({ player, state: "stopped" }));})
|
||||
} catch {
|
||||
console.log("nothing selected/loaded");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue