Hard code autoplay to true for Twitch SDK happiness #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this PR:
Recently it has surfaced that the player will not rerender when a new Twitch URL is passed. This means, when you change the URL of your live video, it will not appear until after a refresh, or play/pause, or switching channels. More details on this bug here cookpete#498
Yes, this is hard coding, yes it looks hacky, but it's actually not! The
playing
prop should be used to play and pause the video, not to control theautoplay
value for loading the Twitch SDK. In our case, we want Twitch videos to always autoplay (I think).Testing instructions:
create two twitch_live type videos that are both currently live
put them in your livestreams collection
see the top video play
switch the order, see the new video play
switch back and forth a few times -- should work indefinitely
Has been tested on Chrome, Firebox, and iOS.