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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ export default class Video extends Component {
}; };
_onPlaybackRateChange = (event) => { _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}); this.setState({showPoster: false});
} }
@ -282,6 +282,7 @@ Video.propTypes = {
ignoreSilentSwitch: PropTypes.oneOf(['ignore', 'obey']), ignoreSilentSwitch: PropTypes.oneOf(['ignore', 'obey']),
disableFocus: PropTypes.bool, disableFocus: PropTypes.bool,
controls: PropTypes.bool, controls: PropTypes.bool,
audioOnly: PropTypes.bool,
currentTime: PropTypes.number, currentTime: PropTypes.number,
progressUpdateInterval: PropTypes.number, progressUpdateInterval: PropTypes.number,
onLoadStart: PropTypes.func, onLoadStart: PropTypes.func,