{"action":"created","comment":{"url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/comments/266660152","pull_request_review_id":215875361,"id":266660152,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NjY2MDE1Mg==","diff_hunk":"@@ -344,10 +339,36 @@ export default function factory(player, initialList, initialIndex = 0) {\n         playlist.player_,\n         list[playlist.currentIndex_]\n       );\n-    } else {\n-      playlist.currentIndex_ = indexInPlaylistItemIds(list, playlist.currentPlaylistItemId_);\n+\n+      return playlist.currentIndex_;\n     }\n \n+    const src = playlist.player_.currentSrc() || '';","path":"src/playlist-maker.js","position":124,"original_position":124,"commit_id":"20e02870bdf90b5836305a93cfd2fd8f1534ab63","original_commit_id":"20e02870bdf90b5836305a93cfd2fd8f1534ab63","user":{"login":"misteroneill","id":214723,"node_id":"MDQ6VXNlcjIxNDcyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/214723?v=4","gravatar_id":"","url":"https://api.github.com/users/misteroneill","html_url":"https://github.com/misteroneill","followers_url":"https://api.github.com/users/misteroneill/followers","following_url":"https://api.github.com/users/misteroneill/following{/other_user}","gists_url":"https://api.github.com/users/misteroneill/gists{/gist_id}","starred_url":"https://api.github.com/users/misteroneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misteroneill/subscriptions","organizations_url":"https://api.github.com/users/misteroneill/orgs","repos_url":"https://api.github.com/users/misteroneill/repos","events_url":"https://api.github.com/users/misteroneill/events{/privacy}","received_events_url":"https://api.github.com/users/misteroneill/received_events","type":"User","site_admin":false},"body":"The changes below here are the meat and potatoes. See the comments for details.","created_at":"2019-03-18T22:02:52Z","updated_at":"2019-03-18T22:02:55Z","html_url":"https://github.com/brightcove/videojs-playlist/pull/145#discussion_r266660152","pull_request_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/comments/266660152"},"html":{"href":"https://github.com/brightcove/videojs-playlist/pull/145#discussion_r266660152"},"pull_request":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145","id":262239042,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYyMjM5MDQy","html_url":"https://github.com/brightcove/videojs-playlist/pull/145","diff_url":"https://github.com/brightcove/videojs-playlist/pull/145.diff","patch_url":"https://github.com/brightcove/videojs-playlist/pull/145.patch","issue_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/145","number":145,"state":"open","locked":false,"title":"fix: Fix regression(s) introduced by changes to the currentItem function in 4.3.0","user":{"login":"misteroneill","id":214723,"node_id":"MDQ6VXNlcjIxNDcyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/214723?v=4","gravatar_id":"","url":"https://api.github.com/users/misteroneill","html_url":"https://github.com/misteroneill","followers_url":"https://api.github.com/users/misteroneill/followers","following_url":"https://api.github.com/users/misteroneill/following{/other_user}","gists_url":"https://api.github.com/users/misteroneill/gists{/gist_id}","starred_url":"https://api.github.com/users/misteroneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misteroneill/subscriptions","organizations_url":"https://api.github.com/users/misteroneill/orgs","repos_url":"https://api.github.com/users/misteroneill/repos","events_url":"https://api.github.com/users/misteroneill/events{/privacy}","received_events_url":"https://api.github.com/users/misteroneill/received_events","type":"User","site_admin":false},"body":"Fixes #142 \r\n\r\nThis fixes a regression introduced in #115. The core issue was that we lost the old behavior of falling back to detecting the current item based on its source URL and relied exclusively on the new, internal `playlistItemId_`.\r\n\r\nThe reported issue (#142) indicated that the `currentItem()` return value before a source was set was now `-1` where previously it was `0`. This is a consequence of that change and has been fixed.\r\n\r\nOther issues were discovered in this process. In some cases, we were leaking the internal representation of playlists. Most importantly, though, was the realization that the plugin no longer behaved correctly when a source was set from outside the playlist API (e.g. via `player.src()`).","created_at":"2019-03-18T21:47:40Z","updated_at":"2019-03-18T22:02:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"479480c573ffb867d25eb8492b963667eb8b5db7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145/commits","review_comments_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145/comments","review_comment_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/145/comments","statuses_url":"https://api.github.com/repos/brightcove/videojs-playlist/statuses/20e02870bdf90b5836305a93cfd2fd8f1534ab63","head":{"label":"brightcove:fix/current-item-regression","ref":"fix/current-item-regression","sha":"20e02870bdf90b5836305a93cfd2fd8f1534ab63","user":{"login":"brightcove","id":277032,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzAzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/277032?v=4","gravatar_id":"","url":"https://api.github.com/users/brightcove","html_url":"https://github.com/brightcove","followers_url":"https://api.github.com/users/brightcove/followers","following_url":"https://api.github.com/users/brightcove/following{/other_user}","gists_url":"https://api.github.com/users/brightcove/gists{/gist_id}","starred_url":"https://api.github.com/users/brightcove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightcove/subscriptions","organizations_url":"https://api.github.com/users/brightcove/orgs","repos_url":"https://api.github.com/users/brightcove/repos","events_url":"https://api.github.com/users/brightcove/events{/privacy}","received_events_url":"https://api.github.com/users/brightcove/received_events","type":"Organization","site_admin":false},"repo":{"id":31225356,"node_id":"MDEwOlJlcG9zaXRvcnkzMTIyNTM1Ng==","name":"videojs-playlist","full_name":"brightcove/videojs-playlist","private":false,"owner":{"login":"brightcove","id":277032,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzAzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/277032?v=4","gravatar_id":"","url":"https://api.github.com/users/brightcove","html_url":"https://github.com/brightcove","followers_url":"https://api.github.com/users/brightcove/followers","following_url":"https://api.github.com/users/brightcove/following{/other_user}","gists_url":"https://api.github.com/users/brightcove/gists{/gist_id}","starred_url":"https://api.github.com/users/brightcove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightcove/subscriptions","organizations_url":"https://api.github.com/users/brightcove/orgs","repos_url":"https://api.github.com/users/brightcove/repos","events_url":"https://api.github.com/users/brightcove/events{/privacy}","received_events_url":"https://api.github.com/users/brightcove/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/brightcove/videojs-playlist","description":"Playlist plugin for videojs","fork":false,"url":"https://api.github.com/repos/brightcove/videojs-playlist","forks_url":"https://api.github.com/repos/brightcove/videojs-playlist/forks","keys_url":"https://api.github.com/repos/brightcove/videojs-playlist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brightcove/videojs-playlist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brightcove/videojs-playlist/teams","hooks_url":"https://api.github.com/repos/brightcove/videojs-playlist/hooks","issue_events_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/events{/number}","events_url":"https://api.github.com/repos/brightcove/videojs-playlist/events","assignees_url":"https://api.github.com/repos/brightcove/videojs-playlist/assignees{/user}","branches_url":"https://api.github.com/repos/brightcove/videojs-playlist/branches{/branch}","tags_url":"https://api.github.com/repos/brightcove/videojs-playlist/tags","blobs_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/refs{/sha}","trees_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brightcove/videojs-playlist/statuses/{sha}","languages_url":"https://api.github.com/repos/brightcove/videojs-playlist/languages","stargazers_url":"https://api.github.com/repos/brightcove/videojs-playlist/stargazers","contributors_url":"https://api.github.com/repos/brightcove/videojs-playlist/contributors","subscribers_url":"https://api.github.com/repos/brightcove/videojs-playlist/subscribers","subscription_url":"https://api.github.com/repos/brightcove/videojs-playlist/subscription","commits_url":"https://api.github.com/repos/brightcove/videojs-playlist/commits{/sha}","git_commits_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/commits{/sha}","comments_url":"https://api.github.com/repos/brightcove/videojs-playlist/comments{/number}","issue_comment_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/comments{/number}","contents_url":"https://api.github.com/repos/brightcove/videojs-playlist/contents/{+path}","compare_url":"https://api.github.com/repos/brightcove/videojs-playlist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brightcove/videojs-playlist/merges","archive_url":"https://api.github.com/repos/brightcove/videojs-playlist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brightcove/videojs-playlist/downloads","issues_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues{/number}","pulls_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls{/number}","milestones_url":"https://api.github.com/repos/brightcove/videojs-playlist/milestones{/number}","notifications_url":"https://api.github.com/repos/brightcove/videojs-playlist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brightcove/videojs-playlist/labels{/name}","releases_url":"https://api.github.com/repos/brightcove/videojs-playlist/releases{/id}","deployments_url":"https://api.github.com/repos/brightcove/videojs-playlist/deployments","created_at":"2015-02-23T19:30:43Z","updated_at":"2019-02-28T15:38:55Z","pushed_at":"2019-03-18T21:47:41Z","git_url":"git://github.com/brightcove/videojs-playlist.git","ssh_url":"git@github.com:brightcove/videojs-playlist.git","clone_url":"https://github.com/brightcove/videojs-playlist.git","svn_url":"https://github.com/brightcove/videojs-playlist","homepage":null,"size":1091,"stargazers_count":184,"watchers_count":184,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":83,"open_issues":34,"watchers":184,"default_branch":"master"}},"base":{"label":"brightcove:master","ref":"master","sha":"20c3902dd7b1f11e1015862114d282b144ce8a2c","user":{"login":"brightcove","id":277032,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzAzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/277032?v=4","gravatar_id":"","url":"https://api.github.com/users/brightcove","html_url":"https://github.com/brightcove","followers_url":"https://api.github.com/users/brightcove/followers","following_url":"https://api.github.com/users/brightcove/following{/other_user}","gists_url":"https://api.github.com/users/brightcove/gists{/gist_id}","starred_url":"https://api.github.com/users/brightcove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightcove/subscriptions","organizations_url":"https://api.github.com/users/brightcove/orgs","repos_url":"https://api.github.com/users/brightcove/repos","events_url":"https://api.github.com/users/brightcove/events{/privacy}","received_events_url":"https://api.github.com/users/brightcove/received_events","type":"Organization","site_admin":false},"repo":{"id":31225356,"node_id":"MDEwOlJlcG9zaXRvcnkzMTIyNTM1Ng==","name":"videojs-playlist","full_name":"brightcove/videojs-playlist","private":false,"owner":{"login":"brightcove","id":277032,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzAzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/277032?v=4","gravatar_id":"","url":"https://api.github.com/users/brightcove","html_url":"https://github.com/brightcove","followers_url":"https://api.github.com/users/brightcove/followers","following_url":"https://api.github.com/users/brightcove/following{/other_user}","gists_url":"https://api.github.com/users/brightcove/gists{/gist_id}","starred_url":"https://api.github.com/users/brightcove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightcove/subscriptions","organizations_url":"https://api.github.com/users/brightcove/orgs","repos_url":"https://api.github.com/users/brightcove/repos","events_url":"https://api.github.com/users/brightcove/events{/privacy}","received_events_url":"https://api.github.com/users/brightcove/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/brightcove/videojs-playlist","description":"Playlist plugin for videojs","fork":false,"url":"https://api.github.com/repos/brightcove/videojs-playlist","forks_url":"https://api.github.com/repos/brightcove/videojs-playlist/forks","keys_url":"https://api.github.com/repos/brightcove/videojs-playlist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brightcove/videojs-playlist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brightcove/videojs-playlist/teams","hooks_url":"https://api.github.com/repos/brightcove/videojs-playlist/hooks","issue_events_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/events{/number}","events_url":"https://api.github.com/repos/brightcove/videojs-playlist/events","assignees_url":"https://api.github.com/repos/brightcove/videojs-playlist/assignees{/user}","branches_url":"https://api.github.com/repos/brightcove/videojs-playlist/branches{/branch}","tags_url":"https://api.github.com/repos/brightcove/videojs-playlist/tags","blobs_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/refs{/sha}","trees_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brightcove/videojs-playlist/statuses/{sha}","languages_url":"https://api.github.com/repos/brightcove/videojs-playlist/languages","stargazers_url":"https://api.github.com/repos/brightcove/videojs-playlist/stargazers","contributors_url":"https://api.github.com/repos/brightcove/videojs-playlist/contributors","subscribers_url":"https://api.github.com/repos/brightcove/videojs-playlist/subscribers","subscription_url":"https://api.github.com/repos/brightcove/videojs-playlist/subscription","commits_url":"https://api.github.com/repos/brightcove/videojs-playlist/commits{/sha}","git_commits_url":"https://api.github.com/repos/brightcove/videojs-playlist/git/commits{/sha}","comments_url":"https://api.github.com/repos/brightcove/videojs-playlist/comments{/number}","issue_comment_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues/comments{/number}","contents_url":"https://api.github.com/repos/brightcove/videojs-playlist/contents/{+path}","compare_url":"https://api.github.com/repos/brightcove/videojs-playlist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brightcove/videojs-playlist/merges","archive_url":"https://api.github.com/repos/brightcove/videojs-playlist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brightcove/videojs-playlist/downloads","issues_url":"https://api.github.com/repos/brightcove/videojs-playlist/issues{/number}","pulls_url":"https://api.github.com/repos/brightcove/videojs-playlist/pulls{/number}","milestones_url":"https://api.github.com/repos/brightcove/videojs-playlist/milestones{/number}","notifications_url":"https://api.github.com/repos/brightcove/videojs-playlist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brightcove/videojs-playlist/labels{/name}","releases_url":"https://api.github.com/repos/brightcove/videojs-playlist/releases{/id}","deployments_url":"https://api.github.com/repos/brightcove/videojs-playlist/deployments","created_at":"2015-02-23T19:30:43Z","updated_at":"2019-02-28T15:38:55Z","pushed_at":"2019-03-18T21:47:41Z","git_url":"git://github.com/brightcove/videojs-playlist.git","ssh_url":"git@github.com:brightcove/videojs-playlist.git","clone_url":"https://github.com/brightcove/videojs-playlist.git","svn_url":"https://github.com/brightcove/videojs-playlist","homepage":null,"size":1091,"stargazers_count":184,"watchers_count":184,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":83,"open_issues":34,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145"},"html":{"href":"https://github.com/brightcove/videojs-playlist/pull/145"},"issue":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/issues/145"},"comments":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/brightcove/videojs-playlist/statuses/20e02870bdf90b5836305a93cfd2fd8f1534ab63"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"misteroneill"}}