lbry-desktop/src/ui/component/viewers/videoViewer/index.js

24 lines
808 B
JavaScript
Raw Normal View History

2019-08-02 08:28:14 +02:00
import { connect } from 'react-redux';
import { doChangeVolume, doChangeMute } from 'redux/actions/app';
import { selectVolume, selectMute } from 'redux/selectors/app';
import { savePosition } from 'redux/actions/content';
import { makeSelectContentPositionForUri } from 'redux/selectors/content';
import VideoViewer from './view';
const select = (state, props) => ({
volume: selectVolume(state),
position: makeSelectContentPositionForUri(props.uri)(state),
muted: selectMute(state),
});
const perform = dispatch => ({
changeVolume: volume => dispatch(doChangeVolume(volume)),
savePosition: (claimId, outpoint, position) => dispatch(savePosition(claimId, outpoint, position)),
changeMute: muted => dispatch(doChangeMute(muted)),
});
export default connect(
select,
perform
)(VideoViewer);