diff options
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/public/bundle.js b/public/bundle.js index 59910d9..055981a 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -867,7 +867,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope var liveInitialState = { loading: false, error: null, - opt: {} + opt: {}, + checkpoints: [], + videos: [] }; var liveReducer = function liveReducer() { @@ -892,6 +894,16 @@ var liveReducer = function liveReducer() { opt: _extends({}, state.opt, _defineProperty({}, action.key, action.value)) }); + case 'LIST_CHECKPOINTS': + return _extends({}, state, { + checkpoints: _extends({}, state.opt, _defineProperty({}, action.key, action.value)) + }); + + case 'LIST_VIDEOS': + return _extends({}, state, { + videos: _extends({}, state.opt, _defineProperty({}, action.key, action.value)) + }); + default: return state; } @@ -915,6 +927,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.socket = undefined; +exports.list_checkpoints = list_checkpoints; +exports.list_videos = list_videos; exports.get_params = get_params; exports.set_param = set_param; @@ -923,6 +937,8 @@ var _store = __webpack_require__(/*! ./store */ "./app/client/store.js"); var socket = io.connect('/client'); var got_frame = false; +// SOCKET ACTIONS + socket.on('res', function (data) { console.log(data.cmd); switch (data.cmd) { @@ -939,6 +955,18 @@ socket.on('res', function (data) { opt: data.res }); break; + case 'list_checkpoints': + _store.store.dispatch({ + type: 'LIST_CHECKPOINTS', + opt: data.res + }); + break; + case 'list_videos': + _store.store.dispatch({ + type: 'LIST_VIDEOS', + opt: data.res + }); + break; default: break; } @@ -967,6 +995,16 @@ setTimeout(function () { } }, 500); +function list_checkpoints() { + socket.emit('cmd', { + cmd: 'list_checkpoints' + }); +} +function list_videos() { + socket.emit('cmd', { + cmd: 'list_videos' + }); +} function get_params() { socket.emit('cmd', { cmd: 'get_params' |
