import React, { Component } from 'react'
import { connect } from 'react-redux'
import { PlayButton, PlayerTime, VolumeControl } from './viewer.icons'
class NavPlayer extends Component {
render() {
const { playing, play_ts, duration, volume } = this.props
const className = playing ? 'nav-player playing' : 'nav-player'
return (
)
}
}
const mapStateToProps = state => ({
playing: state.audio.playing,
volume: state.audio.volume,
play_ts: state.viewer.currentSection ? state.audio.play_ts - state.viewer.currentSection.start_ts : 0,
duration: state.viewer.currentSection ? state.viewer.currentSection.end_ts - state.viewer.currentSection.start_ts : 0,
})
export default connect(mapStateToProps)(NavPlayer)