diff --git a/src/ReactPlayer.js b/src/ReactPlayer.js index f469bf2f..fda66067 100644 --- a/src/ReactPlayer.js +++ b/src/ReactPlayer.js @@ -119,12 +119,12 @@ export default class ReactPlayer extends Component { return 0 } render () { - const { url, style, width, height, light, wrapper: Wrapper } = this.props + const { url, controls, style, width, height, light, wrapper: Wrapper } = this.props const { showPreview } = this.state const otherProps = omit(this.props, SUPPORTED_PROPS, DEPRECATED_CONFIG_PROPS) const activePlayer = this.getActivePlayer(url) const renderedActivePlayer = this.renderActivePlayer(url, activePlayer) - const preloadPlayers = renderPreloadPlayers(url, this.config) + const preloadPlayers = renderPreloadPlayers(url, controls, this.config) const players = [ renderedActivePlayer, ...preloadPlayers ].sort(this.sortPlayers) if (showPreview && url) { return ( diff --git a/src/preload.js b/src/preload.js index cefb8ec2..6568b601 100644 --- a/src/preload.js +++ b/src/preload.js @@ -29,7 +29,7 @@ const PRELOAD_PLAYERS = [ } ] -export default function renderPreloadPlayers (url, config) { +export default function renderPreloadPlayers (url, controls, config) { const players = [] for (let player of PRELOAD_PLAYERS) { @@ -39,6 +39,7 @@ export default function renderPreloadPlayers (url, config) { key={player.Player.displayName} activePlayer={player.Player} url={player.url} + controls={controls} playing muted style={{ display: 'none' }}