{"action":"created","comment":{"url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/comments/199155433","pull_request_review_id":133216754,"id":199155433,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTE1NTQzMw==","diff_hunk":"@@ -1,17 +1,97 @@\n <template>\n-  <figure>\n-    <a :href=\"video.url\" target=\"_blank\" rel=\"noopener\" @click=\"play()\">\n-      <img alt=\"\" :src=\"video.thumbnailUrl\" :width=\"video.width\" :height=\"video.height\" />\n-    </a>\n-    <figcaption v-if=\"video.title\">{{ video.title }}</figcaption>\n-  </figure>\n+  <div class=\"responsive-video\">\n+    <figure>\n+      <fixed-ratio :content=\"video\">\n+        <lazy-load :url=\"video.thumbnailUrl\">\n+          <img\n+            slot-scope=\"imageSource\"\n+            class=\"responsive-video__image\"\n+            v-if=\"!playing && imageSource.computed\"\n+            alt=\"\"\n+            :src=\"imageSource.computed\"\n+          />\n+        </lazy-load>\n+        <iframe\n+          v-if=\"playing\"\n+          :src=\"videoSource\"\n+          style=\"width:100%; height:100%;\"\n+          frameborder=\"0\"\n+          webkitallowfullscreen\n+          mozallowfullscreen\n+          allowfullscreen\n+          allow=\"autoplay\">\n+        </iframe>\n+      </fixed-ratio>\n+      <figcaption v-if=\"video.title\">\n+        <a :href=\"video.url\" target=\"_blank\" rel=\"noopener\">\n+          {{ video.title }}\n+        </a>\n+      </figcaption>\n+    </figure>\n+    <button v-if=\"!playing\" class=\"responsive-video__button\" @click=\"play()\">\n+      <span class=\"a11y-sr-only\">Play</span>\n+      <play-icon />\n+    </button>\n+  </div>\n </template>\n \n <script>\n+\n+import FixedRatio from '../fixed-ratio'\n+import LazyLoad from '../lazy-load'\n+import PlayIcon from '../../static/images/play.svg'\n+\n export default {\n   props: ['video'],\n+  components: { FixedRatio, LazyLoad, PlayIcon },\n+  computed: {\n+    videoSource() {\n+      switch(this.video.provider) {\n+        case 'vimeo':\n+          return this.playing ? `https://player.vimeo.com/video/${this.video.providerUid}?autoplay=1` : ''\n+          break;\n+        case 'youtube':\n+          return this.playing ? `https://www.youtube.com/embed/${this.video.providerUid}?autoplay=1` : ''\n+          break;\n+      }\n+    }\n+  },\n+  data () {\n+    return {\n+      playing: false","path":"src/client/components/responsive-video/responsive-video.vue","position":67,"original_position":67,"commit_id":"38945ea9b5eb78e0a23b6284cb246bf742d85a7a","original_commit_id":"38945ea9b5eb78e0a23b6284cb246bf742d85a7a","user":{"login":"jbmoelker","id":1516059,"node_id":"MDQ6VXNlcjE1MTYwNTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1516059?v=4","gravatar_id":"","url":"https://api.github.com/users/jbmoelker","html_url":"https://github.com/jbmoelker","followers_url":"https://api.github.com/users/jbmoelker/followers","following_url":"https://api.github.com/users/jbmoelker/following{/other_user}","gists_url":"https://api.github.com/users/jbmoelker/gists{/gist_id}","starred_url":"https://api.github.com/users/jbmoelker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbmoelker/subscriptions","organizations_url":"https://api.github.com/users/jbmoelker/orgs","repos_url":"https://api.github.com/users/jbmoelker/repos","events_url":"https://api.github.com/users/jbmoelker/events{/privacy}","received_events_url":"https://api.github.com/users/jbmoelker/received_events","type":"User","site_admin":false},"body":"`isPlaying`?","created_at":"2018-06-29T13:18:12Z","updated_at":"2018-06-29T13:22:44Z","html_url":"https://github.com/voorhoede/lean-web-kit/pull/25#discussion_r199155433","pull_request_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/comments/199155433"},"html":{"href":"https://github.com/voorhoede/lean-web-kit/pull/25#discussion_r199155433"},"pull_request":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25","id":198001534,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MDAxNTM0","html_url":"https://github.com/voorhoede/lean-web-kit/pull/25","diff_url":"https://github.com/voorhoede/lean-web-kit/pull/25.diff","patch_url":"https://github.com/voorhoede/lean-web-kit/pull/25.patch","issue_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/25","number":25,"state":"open","locked":false,"title":"Feat/video component","user":{"login":"sveroude","id":2270161,"node_id":"MDQ6VXNlcjIyNzAxNjE=","avatar_url":"https://avatars3.githubusercontent.com/u/2270161?v=4","gravatar_id":"","url":"https://api.github.com/users/sveroude","html_url":"https://github.com/sveroude","followers_url":"https://api.github.com/users/sveroude/followers","following_url":"https://api.github.com/users/sveroude/following{/other_user}","gists_url":"https://api.github.com/users/sveroude/gists{/gist_id}","starred_url":"https://api.github.com/users/sveroude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sveroude/subscriptions","organizations_url":"https://api.github.com/users/sveroude/orgs","repos_url":"https://api.github.com/users/sveroude/repos","events_url":"https://api.github.com/users/sveroude/events{/privacy}","received_events_url":"https://api.github.com/users/sveroude/received_events","type":"User","site_admin":false},"body":"Resolves [Trello issue 4: Create generic video component](https://trello.com/c/811nAUp6/4-create-generic-video-component).","created_at":"2018-06-28T11:38:32Z","updated_at":"2018-06-29T13:22:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e61b900aac93ea8ae8c304bb9ffbaef4d3c0a8e6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25/commits","review_comments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25/comments","review_comment_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/25/comments","statuses_url":"https://api.github.com/repos/voorhoede/lean-web-kit/statuses/38945ea9b5eb78e0a23b6284cb246bf742d85a7a","head":{"label":"voorhoede:feat/video-component","ref":"feat/video-component","sha":"38945ea9b5eb78e0a23b6284cb246bf742d85a7a","user":{"login":"voorhoede","id":2759382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTkzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/2759382?v=4","gravatar_id":"","url":"https://api.github.com/users/voorhoede","html_url":"https://github.com/voorhoede","followers_url":"https://api.github.com/users/voorhoede/followers","following_url":"https://api.github.com/users/voorhoede/following{/other_user}","gists_url":"https://api.github.com/users/voorhoede/gists{/gist_id}","starred_url":"https://api.github.com/users/voorhoede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voorhoede/subscriptions","organizations_url":"https://api.github.com/users/voorhoede/orgs","repos_url":"https://api.github.com/users/voorhoede/repos","events_url":"https://api.github.com/users/voorhoede/events{/privacy}","received_events_url":"https://api.github.com/users/voorhoede/received_events","type":"Organization","site_admin":false},"repo":{"id":137230338,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMzAzMzg=","name":"lean-web-kit","full_name":"voorhoede/lean-web-kit","owner":{"login":"voorhoede","id":2759382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTkzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/2759382?v=4","gravatar_id":"","url":"https://api.github.com/users/voorhoede","html_url":"https://github.com/voorhoede","followers_url":"https://api.github.com/users/voorhoede/followers","following_url":"https://api.github.com/users/voorhoede/following{/other_user}","gists_url":"https://api.github.com/users/voorhoede/gists{/gist_id}","starred_url":"https://api.github.com/users/voorhoede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voorhoede/subscriptions","organizations_url":"https://api.github.com/users/voorhoede/orgs","repos_url":"https://api.github.com/users/voorhoede/repos","events_url":"https://api.github.com/users/voorhoede/events{/privacy}","received_events_url":"https://api.github.com/users/voorhoede/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/voorhoede/lean-web-kit","description":"Lean Web Kit to kick-start your web project.","fork":false,"url":"https://api.github.com/repos/voorhoede/lean-web-kit","forks_url":"https://api.github.com/repos/voorhoede/lean-web-kit/forks","keys_url":"https://api.github.com/repos/voorhoede/lean-web-kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/voorhoede/lean-web-kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/voorhoede/lean-web-kit/teams","hooks_url":"https://api.github.com/repos/voorhoede/lean-web-kit/hooks","issue_events_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/events{/number}","events_url":"https://api.github.com/repos/voorhoede/lean-web-kit/events","assignees_url":"https://api.github.com/repos/voorhoede/lean-web-kit/assignees{/user}","branches_url":"https://api.github.com/repos/voorhoede/lean-web-kit/branches{/branch}","tags_url":"https://api.github.com/repos/voorhoede/lean-web-kit/tags","blobs_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/voorhoede/lean-web-kit/statuses/{sha}","languages_url":"https://api.github.com/repos/voorhoede/lean-web-kit/languages","stargazers_url":"https://api.github.com/repos/voorhoede/lean-web-kit/stargazers","contributors_url":"https://api.github.com/repos/voorhoede/lean-web-kit/contributors","subscribers_url":"https://api.github.com/repos/voorhoede/lean-web-kit/subscribers","subscription_url":"https://api.github.com/repos/voorhoede/lean-web-kit/subscription","commits_url":"https://api.github.com/repos/voorhoede/lean-web-kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/voorhoede/lean-web-kit/contents/{+path}","compare_url":"https://api.github.com/repos/voorhoede/lean-web-kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/voorhoede/lean-web-kit/merges","archive_url":"https://api.github.com/repos/voorhoede/lean-web-kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/voorhoede/lean-web-kit/downloads","issues_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues{/number}","pulls_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls{/number}","milestones_url":"https://api.github.com/repos/voorhoede/lean-web-kit/milestones{/number}","notifications_url":"https://api.github.com/repos/voorhoede/lean-web-kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/voorhoede/lean-web-kit/labels{/name}","releases_url":"https://api.github.com/repos/voorhoede/lean-web-kit/releases{/id}","deployments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/deployments","created_at":"2018-06-13T14:52:44Z","updated_at":"2018-06-28T08:35:57Z","pushed_at":"2018-06-29T09:34:53Z","git_url":"git://github.com/voorhoede/lean-web-kit.git","ssh_url":"git@github.com:voorhoede/lean-web-kit.git","clone_url":"https://github.com/voorhoede/lean-web-kit.git","svn_url":"https://github.com/voorhoede/lean-web-kit","homepage":"https://lean-web-kit.netlify.com/","size":330,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"voorhoede:master","ref":"master","sha":"a772418b2b302ccb4a07297717f2c923e8f1f349","user":{"login":"voorhoede","id":2759382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTkzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/2759382?v=4","gravatar_id":"","url":"https://api.github.com/users/voorhoede","html_url":"https://github.com/voorhoede","followers_url":"https://api.github.com/users/voorhoede/followers","following_url":"https://api.github.com/users/voorhoede/following{/other_user}","gists_url":"https://api.github.com/users/voorhoede/gists{/gist_id}","starred_url":"https://api.github.com/users/voorhoede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voorhoede/subscriptions","organizations_url":"https://api.github.com/users/voorhoede/orgs","repos_url":"https://api.github.com/users/voorhoede/repos","events_url":"https://api.github.com/users/voorhoede/events{/privacy}","received_events_url":"https://api.github.com/users/voorhoede/received_events","type":"Organization","site_admin":false},"repo":{"id":137230338,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMzAzMzg=","name":"lean-web-kit","full_name":"voorhoede/lean-web-kit","owner":{"login":"voorhoede","id":2759382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NTkzODI=","avatar_url":"https://avatars3.githubusercontent.com/u/2759382?v=4","gravatar_id":"","url":"https://api.github.com/users/voorhoede","html_url":"https://github.com/voorhoede","followers_url":"https://api.github.com/users/voorhoede/followers","following_url":"https://api.github.com/users/voorhoede/following{/other_user}","gists_url":"https://api.github.com/users/voorhoede/gists{/gist_id}","starred_url":"https://api.github.com/users/voorhoede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voorhoede/subscriptions","organizations_url":"https://api.github.com/users/voorhoede/orgs","repos_url":"https://api.github.com/users/voorhoede/repos","events_url":"https://api.github.com/users/voorhoede/events{/privacy}","received_events_url":"https://api.github.com/users/voorhoede/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/voorhoede/lean-web-kit","description":"Lean Web Kit to kick-start your web project.","fork":false,"url":"https://api.github.com/repos/voorhoede/lean-web-kit","forks_url":"https://api.github.com/repos/voorhoede/lean-web-kit/forks","keys_url":"https://api.github.com/repos/voorhoede/lean-web-kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/voorhoede/lean-web-kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/voorhoede/lean-web-kit/teams","hooks_url":"https://api.github.com/repos/voorhoede/lean-web-kit/hooks","issue_events_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/events{/number}","events_url":"https://api.github.com/repos/voorhoede/lean-web-kit/events","assignees_url":"https://api.github.com/repos/voorhoede/lean-web-kit/assignees{/user}","branches_url":"https://api.github.com/repos/voorhoede/lean-web-kit/branches{/branch}","tags_url":"https://api.github.com/repos/voorhoede/lean-web-kit/tags","blobs_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/voorhoede/lean-web-kit/statuses/{sha}","languages_url":"https://api.github.com/repos/voorhoede/lean-web-kit/languages","stargazers_url":"https://api.github.com/repos/voorhoede/lean-web-kit/stargazers","contributors_url":"https://api.github.com/repos/voorhoede/lean-web-kit/contributors","subscribers_url":"https://api.github.com/repos/voorhoede/lean-web-kit/subscribers","subscription_url":"https://api.github.com/repos/voorhoede/lean-web-kit/subscription","commits_url":"https://api.github.com/repos/voorhoede/lean-web-kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/voorhoede/lean-web-kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/voorhoede/lean-web-kit/contents/{+path}","compare_url":"https://api.github.com/repos/voorhoede/lean-web-kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/voorhoede/lean-web-kit/merges","archive_url":"https://api.github.com/repos/voorhoede/lean-web-kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/voorhoede/lean-web-kit/downloads","issues_url":"https://api.github.com/repos/voorhoede/lean-web-kit/issues{/number}","pulls_url":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls{/number}","milestones_url":"https://api.github.com/repos/voorhoede/lean-web-kit/milestones{/number}","notifications_url":"https://api.github.com/repos/voorhoede/lean-web-kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/voorhoede/lean-web-kit/labels{/name}","releases_url":"https://api.github.com/repos/voorhoede/lean-web-kit/releases{/id}","deployments_url":"https://api.github.com/repos/voorhoede/lean-web-kit/deployments","created_at":"2018-06-13T14:52:44Z","updated_at":"2018-06-28T08:35:57Z","pushed_at":"2018-06-29T09:34:53Z","git_url":"git://github.com/voorhoede/lean-web-kit.git","ssh_url":"git@github.com:voorhoede/lean-web-kit.git","clone_url":"https://github.com/voorhoede/lean-web-kit.git","svn_url":"https://github.com/voorhoede/lean-web-kit","homepage":"https://lean-web-kit.netlify.com/","size":330,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25"},"html":{"href":"https://github.com/voorhoede/lean-web-kit/pull/25"},"issue":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/25"},"comments":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/voorhoede/lean-web-kit/statuses/38945ea9b5eb78e0a23b6284cb246bf742d85a7a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jbmoelker"}}