{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/frontend/issues/20286","repository_url":"https://api.github.com/repos/guardian/frontend","labels_url":"https://api.github.com/repos/guardian/frontend/issues/20286/labels{/name}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/20286/comments","events_url":"https://api.github.com/repos/guardian/frontend/issues/20286/events","html_url":"https://github.com/guardian/frontend/pull/20286","id":357232630,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMjk2NDY2","number":20286,"title":"Load YouTube assets on fronts on placeholder click","user":{"login":"SiAdcock","id":5931528,"node_id":"MDQ6VXNlcjU5MzE1Mjg=","avatar_url":"https://avatars1.githubusercontent.com/u/5931528?v=4","gravatar_id":"","url":"https://api.github.com/users/SiAdcock","html_url":"https://github.com/SiAdcock","followers_url":"https://api.github.com/users/SiAdcock/followers","following_url":"https://api.github.com/users/SiAdcock/following{/other_user}","gists_url":"https://api.github.com/users/SiAdcock/gists{/gist_id}","starred_url":"https://api.github.com/users/SiAdcock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiAdcock/subscriptions","organizations_url":"https://api.github.com/users/SiAdcock/orgs","repos_url":"https://api.github.com/users/SiAdcock/repos","events_url":"https://api.github.com/users/SiAdcock/events{/privacy}","received_events_url":"https://api.github.com/users/SiAdcock/received_events","type":"User","site_admin":false},"labels":[{"id":512259700,"node_id":"MDU6TGFiZWw1MTIyNTk3MDA=","url":"https://api.github.com/repos/guardian/frontend/labels/Seen-on-PROD","name":"Seen-on-PROD","color":"bfe5bf","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-05T13:35:35Z","updated_at":"2018-09-10T13:46:47Z","closed_at":"2018-09-10T13:31:17Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/20286","html_url":"https://github.com/guardian/frontend/pull/20286","diff_url":"https://github.com/guardian/frontend/pull/20286.diff","patch_url":"https://github.com/guardian/frontend/pull/20286.patch"},"body":"## What does this change?\r\n\r\nCurrently, YouTube assets for all videos on a front are loaded up front with the enhanced JavaScript, regardless of whether the user intends to watch any videos. \r\n\r\nThis change loads the YouTube assets only when the user clicks on the video placeholder. When the video loads, it immediately starts playing ([`player.playVideo()`](https://developers.google.com/youtube/iframe_api_reference#playVideo) is called programatically)\r\n\r\nThis does not affect the behaviour of video articles or videos embedded in articles.\r\n\r\n## Screenshots\r\n\r\n**Before**\r\n\r\n![screen shot 2018-09-05 at 14 27 17](https://user-images.githubusercontent.com/5931528/45096177-dc1c3380-b117-11e8-8c4f-d000a6e33c24.png)\r\n\r\n**After**\r\n\r\n![screen shot 2018-09-05 at 14 26 43](https://user-images.githubusercontent.com/5931528/45096188-e2aaab00-b117-11e8-8a68-9b6f9541ce29.png)\r\n\r\n## What is the value of this and can you measure success?\r\n\r\nI will flesh this out with some actual numbers, but in general:\r\n\r\n- Far fewer requests to YouTube (~30 on the video front)\r\n- Fewer unnecessary assets loaded (~3MB on the video front)\r\n- Shorter time to interactive (TBC)\r\n\r\n## Checklist\r\n\r\n### Does this affect other platforms?\r\n\r\n- [ ] AMP <!-- AMP question? https://git.io/v9zIE -->\r\n- [ ] Apps\r\n- [ ] Other (please specify)\r\n\r\n### Does this affect GLabs Paid Content Pages? Should it have support for Paid Content?\r\n\r\n<!-- if there are versions of this content with the paid styling (teal and grey) then they will need to be checked -->\r\n<!-- content can be found here: https://www.theguardian.com/tone/advertisement-features -->\r\n\r\n- [x] No\r\n- [ ] Yes (please give details)\r\n\r\n### Does this change break ad-free?\r\n\r\n<!-- The scope for this includes, but is not limited to, ad-slots, page targeting, podcasts, rich links, outbrain, -->\r\n<!-- merchandising, page skins and paid-for content -->\r\n<!-- If there's any chance it could cause problems, please test it with an appropriate test user or add a new test -->\r\n<!-- scenario -->\r\n\r\n- [x] No\r\n- [ ] It did, but tests caught it and I fixed it\r\n- [ ] It did, but there was no test coverage so I added that then fixed it\r\n\r\n### Accessibility test checklist\r\n\r\n<!-- for changes that affect how a page appears in the browser -->\r\n\r\n- [x] [Tested with screen reader](https://accessibility.gutools.co.uk/testing/web/screen-readers/) - still bad\r\n- [x] [Navigable with keyboard](https://accessibility.gutools.co.uk/testing/web/keyboard-navigation/) - still bad\r\n- [x] [Colour contrast passed](https://accessibility.gutools.co.uk/testing/web/colour-contrast/)\r\n\r\n### Tested\r\n\r\n- [x] Locally\r\n- [ ] On CODE (optional)\r\n\r\n<!-- AB test? https://git.io/v1V0x -->\r\n<!-- Does this PR meet the contributing guidelines? https://git.io/v1VEJ -->\r\n"},"comment":{"url":"https://api.github.com/repos/guardian/frontend/issues/comments/419917697","html_url":"https://github.com/guardian/frontend/pull/20286#issuecomment-419917697","issue_url":"https://api.github.com/repos/guardian/frontend/issues/20286","id":419917697,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTkxNzY5Nw==","user":{"login":"prout-bot","id":8896019,"node_id":"MDQ6VXNlcjg4OTYwMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/8896019?v=4","gravatar_id":"","url":"https://api.github.com/users/prout-bot","html_url":"https://github.com/prout-bot","followers_url":"https://api.github.com/users/prout-bot/followers","following_url":"https://api.github.com/users/prout-bot/following{/other_user}","gists_url":"https://api.github.com/users/prout-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/prout-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prout-bot/subscriptions","organizations_url":"https://api.github.com/users/prout-bot/orgs","repos_url":"https://api.github.com/users/prout-bot/repos","events_url":"https://api.github.com/users/prout-bot/events{/privacy}","received_events_url":"https://api.github.com/users/prout-bot/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T13:46:47Z","updated_at":"2018-09-10T13:46:47Z","author_association":"COLLABORATOR","body":"Seen on [PROD](https://frontend.gutools.co.uk/deploys?stage=PROD&pageSize=50) (merged by @SiAdcock 15 minutes and 30 seconds ago) \n- Check your changes on [www.theguardian.com](https://www.theguardian.com) ✔️\n- Keep an eye on the [deploy dashboard](https://logs.gutools.co.uk/app/kibana#/dashboard/8730df10-49fd-11e7-b778-ebbe55169b8f?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(darkTheme:!f,useMargins:!f),panels:!((gridData:(h:4,i:'4',w:6,x:6,y:0),id:'735f9ce0-4a04-11e7-9f15-395e2d1c9b1f',panelIndex:'4',type:visualization,version:'6.2.4'),(gridData:(h:4,i:'5',w:6,x:0,y:0),id:b9249830-4a03-11e7-91e8-2fbfd59c38bb,panelIndex:'5',type:visualization,version:'6.2.4'),(gridData:(h:4,i:'7',w:6,x:0,y:4),id:ac507b90-4a0f-11e7-9f15-395e2d1c9b1f,panelIndex:'7',type:visualization,version:'6.2.4'),(gridData:(h:4,i:'9',w:6,x:6,y:4),id:a5f78860-4ad2-11e7-9930-73b4968e85d8,panelIndex:'9',type:visualization,version:'6.2.4')),query:(language:lucene,query:(query_string:(analyze_wildcard:!t,query:'stage:PROD%20NOT%20app:preview'))),timeRestore:!f,title:'Frontend%20PROD%20Deploy',viewMode:view)) 📉\n"}}
{"actor":{"display_login":"prout-bot"}}