blob: a19f1c9856d21a1439a7a096e26e8846d944e65e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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
return (
<div className='nav-player'>
<PlayButton playing={playing} />
<PlayerTime play_ts={play_ts} duration={duration} />
<VolumeControl volume={volume} />
</div>
)
}
}
const mapStateToProps = state => ({
playing: state.audio.playing,
volume: state.audio.volume,
play_ts: state.audio.play_ts,
duration: state.align.timeline.duration,
})
export default connect(mapStateToProps)(NavPlayer)
|