summaryrefslogtreecommitdiff
path: root/app/client/live/actions.js
blob: e63854ef3e5878370ee94a0ec9d664d11805f36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import * as socket from '../socket'
import types from '../types'

export const get_params = () => {
  socket.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: types.player.set_param, key, value, }
}

export const list_checkpoints = () => {
  socket.list_checkpoints()
  return { type: types.player.loading_checkpoints, }
}

export const list_epochs = (path) => {
  socket.list_epochs(path)
  return { type: types.player.loading_epochs, }
}

export const list_sequences = () => {
  socket.list_sequences()
  return { type: types.player.loading_sequences }
}

export const load_sequence = (sequence) => {
  socket.load_sequence(sequence)
  return { type: types.player.loading_sequence, }
}

export const load_epoch = (checkpoint, epoch) => {
  socket.load_epoch(checkpoint, epoch)
  return { type: types.player.loading_checkpoint, }
}

export const seek = (frame) => {
  socket.seek(frame)
  return { type: types.player.seeking, }
}

export const pause = (frame) => {
  socket.pause(pause)
  return { type: types.player.pausing, }
}

export const play = (frame) => {
  socket.play()
  return { type: types.player.playing, }
}