diff --git a/VideoPlayer.js b/VideoPlayer.js index 99daac9b..adcb8ddb 100644 --- a/VideoPlayer.js +++ b/VideoPlayer.js @@ -128,7 +128,9 @@ export default class VideoPlayer extends Component { */ this.styles = { videoStyle: this.props.videoStyle || {}, - containerStyle: this.props.style || {} + containerStyle: this.props.style || {}, + subtitleContainerStyle: this.props.subtitleContainerStyle || {}, + subtitleStyle: this.props.subtitleStyle || {}, }; } @@ -1075,10 +1077,10 @@ export default class VideoPlayer extends Component { - {this.showSubtitle()} + {this.showSubtitle()} ); } @@ -1108,11 +1110,12 @@ export default class VideoPlayer extends Component { style={[styles.player.video, this.styles.videoStyle]} source={this.props.source} /> - {this.renderSubtitle()} - {this.renderError()} - {this.renderTopControls()} - {this.renderLoader()} - {this.renderBottomControls()} + + { this.props.subtitle ? this.renderSubtitle() : null} + { !this.props.disableError ? this.renderError() : null } + { !this.props.disableBack || !this.props.disableVolume || !this.props.disableFullscreen ? this.renderTopControls() : null } + { !this.props.disableLoader ? this.renderLoader() : null } + { !this.props.disablePlayPause || !this.props.disableTimer || !this.props.disableSeekbar ? this.renderBottomControls() : null } );