{"action":"created","issue":{"url":"https://api.github.com/repos/CookPete/react-player/issues/13","labels_url":"https://api.github.com/repos/CookPete/react-player/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/CookPete/react-player/issues/13/comments","events_url":"https://api.github.com/repos/CookPete/react-player/issues/13/events","html_url":"https://github.com/CookPete/react-player/pull/13","id":122267294,"number":13,"title":"Prime players to enable autoplay when out of focus","user":{"login":"CookPete","id":1926029,"avatar_url":"https://avatars.githubusercontent.com/u/1926029?v=3","gravatar_id":"","url":"https://api.github.com/users/CookPete","html_url":"https://github.com/CookPete","followers_url":"https://api.github.com/users/CookPete/followers","following_url":"https://api.github.com/users/CookPete/following{/other_user}","gists_url":"https://api.github.com/users/CookPete/gists{/gist_id}","starred_url":"https://api.github.com/users/CookPete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CookPete/subscriptions","organizations_url":"https://api.github.com/users/CookPete/orgs","repos_url":"https://api.github.com/users/CookPete/repos","events_url":"https://api.github.com/users/CookPete/events{/privacy}","received_events_url":"https://api.github.com/users/CookPete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-12-15T13:00:17Z","updated_at":"2015-12-24T15:14:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CookPete/react-player/pulls/13","html_url":"https://github.com/CookPete/react-player/pull/13","diff_url":"https://github.com/CookPete/react-player/pull/13.diff","patch_url":"https://github.com/CookPete/react-player/pull/13.patch"},"body":"My version of https://github.com/CookPete/react-player/pull/12 that attempts to fix [autoplay issues](https://github.com/CookPete/react-player/issues/7) when `ReactPlayer` is not in a focused tab. In short:\r\n\r\n* Render all players at once, but only give `props` to the player that can play the current `url`\r\n* Each player then sets `display: none` on itself if `url` is not present\r\n* When `ReactPlayer` mounts, if `YouTube` or `Vimeo` players don't have a `url`, then `prime` the player by playing a short, silent video whilst hidden. This allows the players to autoplay any URLs given later on, even if not in a focused tab.\r\n\r\n@Fauntleroy, any thoughts?"},"comment":{"url":"https://api.github.com/repos/CookPete/react-player/issues/comments/167123311","html_url":"https://github.com/CookPete/react-player/pull/13#issuecomment-167123311","issue_url":"https://api.github.com/repos/CookPete/react-player/issues/13","id":167123311,"user":{"login":"CookPete","id":1926029,"avatar_url":"https://avatars.githubusercontent.com/u/1926029?v=3","gravatar_id":"","url":"https://api.github.com/users/CookPete","html_url":"https://github.com/CookPete","followers_url":"https://api.github.com/users/CookPete/followers","following_url":"https://api.github.com/users/CookPete/following{/other_user}","gists_url":"https://api.github.com/users/CookPete/gists{/gist_id}","starred_url":"https://api.github.com/users/CookPete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CookPete/subscriptions","organizations_url":"https://api.github.com/users/CookPete/orgs","repos_url":"https://api.github.com/users/CookPete/repos","events_url":"https://api.github.com/users/CookPete/events{/privacy}","received_events_url":"https://api.github.com/users/CookPete/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T15:14:44Z","updated_at":"2015-12-24T15:14:44Z","body":"I'm gonna merge this in an attempt to avoid conflicts with other fixes. Hopefully all problems (other than the weird minified issue) have been sorted"}}