1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 13:26:40 +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

@ -6,6 +6,11 @@ export const playerSetFile = (file: IPlayerState['file']) => ({
file,
});
export const playerSetFileAndPlay = (file: IPlayerState['file']) => ({
type: PLAYER_ACTIONS.SET_FILE_AND_PLAY,
file,
});
export const playerSetStatus = (status: IPlayerState['status']) => ({
type: PLAYER_ACTIONS.SET_STATUS,
status,
@ -19,6 +24,14 @@ export const playerPause = () => ({
type: PLAYER_ACTIONS.PAUSE,
});
export const playerStop = () => ({
type: PLAYER_ACTIONS.STOP,
});
export const playerStopped = () => ({
type: PLAYER_ACTIONS.STOPPED,
});
export const playerSeek = (seek: number) => ({
type: PLAYER_ACTIONS.SEEK,
seek,