diff options
Diffstat (limited to 'app/client/live/actions.js')
| -rw-r--r-- | app/client/live/actions.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/app/client/live/actions.js b/app/client/live/actions.js index c9927b3..e63854e 100644 --- a/app/client/live/actions.js +++ b/app/client/live/actions.js @@ -1,52 +1,53 @@ import * as socket from '../socket' +import types from '../types' export const get_params = () => { socket.get_params() - return { type: 'GET_PARAMS', } + return { type: types.player.get_params, } } export const set_param = (key, value) => { console.log('set param', key, value) socket.set_param(key, value) - return { type: 'SET_PARAM', key, value, } + return { type: types.player.set_param, key, value, } } export const list_checkpoints = () => { socket.list_checkpoints() - return { type: 'LOADING_CHECKPOINTS', } + return { type: types.player.loading_checkpoints, } } export const list_epochs = (path) => { socket.list_epochs(path) - return { type: 'LOADING_EPOCHS', } + return { type: types.player.loading_epochs, } } export const list_sequences = () => { socket.list_sequences() - return { type: 'LOADING_SEQUENCES', } + return { type: types.player.loading_sequences } } export const load_sequence = (sequence) => { socket.load_sequence(sequence) - return { type: 'LOADING_SEQUENCE', } + return { type: types.player.loading_sequence, } } export const load_epoch = (checkpoint, epoch) => { socket.load_epoch(checkpoint, epoch) - return { type: 'LOADING_CHECKPOINT', } + return { type: types.player.loading_checkpoint, } } export const seek = (frame) => { socket.seek(frame) - return { type: 'SEEKING', } + return { type: types.player.seeking, } } export const pause = (frame) => { socket.pause(pause) - return { type: 'PAUSING', } + return { type: types.player.pausing, } } export const play = (frame) => { socket.play() - return { type: 'PLAYING', } + return { type: types.player.playing, } } |
