{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/o-video/pulls/comments/78943223","id":78943223,"diff_hunk":"@@ -6,12 +6,11 @@ class Playlist {\n \t\tconst currentId = opts.player.videoData ? opts.player.videoData.id : opts.player.opts.id;\n \t\tthis.currentIndex = currentId ? opts.queue.indexOf(currentId.toString()) : -1;\n \n-\t\tthis.opts.player.containerEl.addEventListener('ended', this.next.bind(this), true);\n-\n \t\tthis.cache = {};\n \n-\t\tif (this.opts.autoplay && this.currentIndex === -1) {\n-\t\t\tthis.next();\n+\t\tif (this.opts.autoplay) {\n+\t\t\tthis.opts.player.containerEl.addEventListener('ended', this.next.bind(this), true);\n+\t\t\tthis.currentIndex === -1 && this.next();","path":"src/js/playlist.js","position":12,"original_position":12,"commit_id":"e7234ce86c980da5e7cdb1b35f46f7acbbd4e016","original_commit_id":"f9a81a8458d8957e3c34757bf9362d273e5d8063","user":{"login":"leggsimon","id":11544418,"avatar_url":"https://avatars.githubusercontent.com/u/11544418?v=3","gravatar_id":"","url":"https://api.github.com/users/leggsimon","html_url":"https://github.com/leggsimon","followers_url":"https://api.github.com/users/leggsimon/followers","following_url":"https://api.github.com/users/leggsimon/following{/other_user}","gists_url":"https://api.github.com/users/leggsimon/gists{/gist_id}","starred_url":"https://api.github.com/users/leggsimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leggsimon/subscriptions","organizations_url":"https://api.github.com/users/leggsimon/orgs","repos_url":"https://api.github.com/users/leggsimon/repos","events_url":"https://api.github.com/users/leggsimon/events{/privacy}","received_events_url":"https://api.github.com/users/leggsimon/received_events","type":"User","site_admin":false},"body":"We do have a bit of that scattered in this code mind you","created_at":"2016-09-15T11:33:42Z","updated_at":"2016-09-15T11:33:42Z","html_url":"https://github.com/Financial-Times/o-video/pull/48#discussion_r78943223","pull_request_url":"https://api.github.com/repos/Financial-Times/o-video/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/comments/78943223"},"html":{"href":"https://github.com/Financial-Times/o-video/pull/48#discussion_r78943223"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/o-video/pulls/48","id":85386422,"html_url":"https://github.com/Financial-Times/o-video/pull/48","diff_url":"https://github.com/Financial-Times/o-video/pull/48.diff","patch_url":"https://github.com/Financial-Times/o-video/pull/48.patch","issue_url":"https://api.github.com/repos/Financial-Times/o-video/issues/48","number":48,"state":"open","locked":false,"title":"Fix autoplay option adding ended listener when it shouldn't","user":{"login":"i-like-robots","id":271645,"avatar_url":"https://avatars.githubusercontent.com/u/271645?v=3","gravatar_id":"","url":"https://api.github.com/users/i-like-robots","html_url":"https://github.com/i-like-robots","followers_url":"https://api.github.com/users/i-like-robots/followers","following_url":"https://api.github.com/users/i-like-robots/following{/other_user}","gists_url":"https://api.github.com/users/i-like-robots/gists{/gist_id}","starred_url":"https://api.github.com/users/i-like-robots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i-like-robots/subscriptions","organizations_url":"https://api.github.com/users/i-like-robots/orgs","repos_url":"https://api.github.com/users/i-like-robots/repos","events_url":"https://api.github.com/users/i-like-robots/events{/privacy}","received_events_url":"https://api.github.com/users/i-like-robots/received_events","type":"User","site_admin":false},"body":"whoops 🙄","created_at":"2016-09-15T11:24:08Z","updated_at":"2016-09-15T11:33:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e93105de4166b200ef916935488208c033093e3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/o-video/pulls/48/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/o-video/pulls/48/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/o-video/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/o-video/issues/48/comments","statuses_url":"https://api.github.com/repos/Financial-Times/o-video/statuses/e7234ce86c980da5e7cdb1b35f46f7acbbd4e016","head":{"label":"Financial-Times:matth/fix-ended","ref":"matth/fix-ended","sha":"e7234ce86c980da5e7cdb1b35f46f7acbbd4e016","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":45257519,"name":"o-video","full_name":"Financial-Times/o-video","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/o-video","description":"Standard video player and controls","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-video","forks_url":"https://api.github.com/repos/Financial-Times/o-video/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-video/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-video/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-video/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-video/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-video/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-video/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-video/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-video/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-video/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-video/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-video/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-video/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-video/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/o-video/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-video/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-video/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-video/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-video/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-video/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-video/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-video/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/o-video/deployments","created_at":"2015-10-30T14:57:59Z","updated_at":"2016-08-22T09:21:43Z","pushed_at":"2016-09-15T11:33:40Z","git_url":"git://github.com/Financial-Times/o-video.git","ssh_url":"git@github.com:Financial-Times/o-video.git","clone_url":"https://github.com/Financial-Times/o-video.git","svn_url":"https://github.com/Financial-Times/o-video","homepage":"http://registry.origami.ft.com/components/o-video","size":307,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"33e5cdca2f0f91a52c011e4c7b374a9c2d085e57","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":45257519,"name":"o-video","full_name":"Financial-Times/o-video","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/o-video","description":"Standard video player and controls","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-video","forks_url":"https://api.github.com/repos/Financial-Times/o-video/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-video/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-video/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-video/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-video/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-video/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-video/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-video/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-video/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-video/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-video/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-video/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-video/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-video/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/o-video/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-video/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-video/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-video/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-video/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-video/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-video/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-video/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/o-video/deployments","created_at":"2015-10-30T14:57:59Z","updated_at":"2016-08-22T09:21:43Z","pushed_at":"2016-09-15T11:33:40Z","git_url":"git://github.com/Financial-Times/o-video.git","ssh_url":"git@github.com:Financial-Times/o-video.git","clone_url":"https://github.com/Financial-Times/o-video.git","svn_url":"https://github.com/Financial-Times/o-video","homepage":"http://registry.origami.ft.com/components/o-video","size":307,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/48"},"html":{"href":"https://github.com/Financial-Times/o-video/pull/48"},"issue":{"href":"https://api.github.com/repos/Financial-Times/o-video/issues/48"},"comments":{"href":"https://api.github.com/repos/Financial-Times/o-video/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/o-video/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/o-video/statuses/e7234ce86c980da5e7cdb1b35f46f7acbbd4e016"}}}}
{"actor":{"display_login":"leggsimon"}}