import * as types from 'app/types' import { session, getDefault, getDefaultInt } from 'app/session' const initialState = { playing: false, play_ts: 0, muted: false, } 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, } case types.audio.toggle_muted: return { ...state, muted: !state.muted, } default: return state } }