Skip to content

Commit

Permalink
Tweak Twitch controls bug comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Nov 6, 2019
1 parent 09b47a2 commit 987a18b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/players/Twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class Twitch extends Component {
callPlayer = callPlayer
playerID = PLAYER_ID_PREFIX + randomString()
load (url, isReady) {
const { playsinline, onError, config } = this.props
const { playsinline, onError, config, controls } = this.props
const isChannel = MATCH_CHANNEL_URL.test(url)
const id = isChannel ? url.match(MATCH_CHANNEL_URL)[1] : url.match(MATCH_VIDEO_URL)[1]
if (isReady) {
Expand All @@ -37,8 +37,8 @@ export class Twitch extends Component {
playsinline: playsinline,
autoplay: this.props.playing,
muted: this.props.muted,
// controls property must be true if url is for channel. See #733
controls: isChannel ? true : this.props.controls,
// https://github.com/CookPete/react-player/issues/733#issuecomment-549085859
controls: isChannel ? true : controls,
...config.twitch.options
})
const { READY, PLAYING, PAUSE, ENDED, ONLINE, OFFLINE } = Twitch.Player
Expand Down

0 comments on commit 987a18b

Please sign in to comment.