1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

better audio player

This commit is contained in:
Fedor Katurov 2019-10-15 17:30:31 +07:00
parent 87b9b5f514
commit c84dfdd2ab
7 changed files with 54 additions and 14 deletions

View file

@ -14,7 +14,7 @@ const mapStateToProps = state => ({
});
const mapDispatchToProps = {
playerSetFile: PLAYER_ACTIONS.playerSetFile,
playerSetFileAndPlay: PLAYER_ACTIONS.playerSetFileAndPlay,
playerPlay: PLAYER_ACTIONS.playerPlay,
playerPause: PLAYER_ACTIONS.playerPause,
playerSeek: PLAYER_ACTIONS.playerSeek,
@ -29,7 +29,7 @@ const AudioPlayerUnconnected = ({
file,
player: { file: current, status },
playerSetFile,
playerSetFileAndPlay,
playerPlay,
playerPause,
playerSeek,
@ -43,8 +43,8 @@ const AudioPlayerUnconnected = ({
return playerPlay();
}
playerSetFile(file);
}, [file, current, status, playerPlay, playerPause, playerSetFile]);
playerSetFileAndPlay(file);
}, [file, current, status, playerPlay, playerPause, playerSetFileAndPlay]);
const onProgress = useCallback(
({ detail }: { detail: IPlayerProgress }) => {