Add prop type for audioOnly

This commit is contained in:
Hampton Maxwell
2018-06-20 16:52:48 -07:00
committed by GitHub
parent fc6244e440
commit b785060b30

View File

@@ -129,7 +129,7 @@ export default class Video extends Component {
};
_onPlaybackRateChange = (event) => {
if (this.state.showPoster && (event.nativeEvent.playbackRate !== 0) && (!this.props.audioOnly)) {
if (this.state.showPoster && event.nativeEvent.playbackRate !== 0 && !this.props.audioOnly) {
this.setState({showPoster: false});
}
@@ -282,6 +282,7 @@ Video.propTypes = {
ignoreSilentSwitch: PropTypes.oneOf(['ignore', 'obey']),
disableFocus: PropTypes.bool,
controls: PropTypes.bool,
audioOnly: PropTypes.bool,
currentTime: PropTypes.number,
progressUpdateInterval: PropTypes.number,
onLoadStart: PropTypes.func,