summaryrefslogtreecommitdiff
path: root/app/client/live/live.reducer.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-07 10:36:40 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-07 10:36:40 +0200
commitaf8b8d4a7bd58d6355665a962e587c149f03cf16 (patch)
tree487cfa814eee281089ee97b28d5457063ee3115b /app/client/live/live.reducer.js
parent1efb98c37e58b3a6f73fccc59ec00aeca9bf3ab1 (diff)
display status message and stuff
Diffstat (limited to 'app/client/live/live.reducer.js')
-rw-r--r--app/client/live/live.reducer.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/client/live/live.reducer.js b/app/client/live/live.reducer.js
index 83beb03..d2b4788 100644
--- a/app/client/live/live.reducer.js
+++ b/app/client/live/live.reducer.js
@@ -11,12 +11,13 @@ const liveInitialState = {
sequences: [],
fps: 0,
playing: false,
+ last_message: '',
frame: { i: 0, sequence_i: 0, sequence_len: '1' }
}
const liveReducer = (state = liveInitialState, action) => {
let results;
-
+console.log(action.type)
switch(action.type) {
case types.socket.load_params:
if (! action.opt || ! Object.keys(action.opt).length) {
@@ -65,6 +66,17 @@ const liveReducer = (state = liveInitialState, action) => {
fps: action.fps,
}
+ case types.system.stdout:
+ console.log(action)
+ if (action.data.processor === 'gpu') {
+ console.log('boo>', action.data)
+ return {
+ ...state,
+ last_message: action.data.data,
+ }
+ }
+ return state
+
case types.player.current_frame:
return action.meta ? {
...state,