import * as types from '../../types' import { session, getDefault, getDefaultInt } from '../../session' const initialState = { playing: false, play_ts: 0, } export default function alignReducer(state = initialState, action) { // console.log(action.type, action) switch (action.type) { case types.audio.play: return { ...state, playing: true, } case types.audio.pause: return { ...state, playing: false, } case types.audio.update_time: return { ...state, play_ts: action.play_ts, } default: return state } }