{"action":"created","comment":{"url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/comments/26851697","id":26851697,"diff_hunk":"@@ -239,7 +244,14 @@ videojs.Hls.prototype.src = function(src) {\n   });\n };\n \n-videojs.Hls.setMediaIndexForLive = function(selectedPlaylist) {\n+/* Returns the media index for the live point in the current playlist, and updates\n+   the current time to go along with it.\n+ */\n+videojs.Hls.getMediaIndexForLive = function(selectedPlaylist) {\n+  if (!selectedPlaylist.segments) {","path":"src/videojs-hls.js","position":38,"original_position":38,"commit_id":"21ab74c37d7f6109fe279320b23da47d4b94acd1","original_commit_id":"354d944959e364314552b8b82b635e5f1ecea43c","user":{"login":"dmlap","id":56667,"avatar_url":"https://avatars.githubusercontent.com/u/56667?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlap","html_url":"https://github.com/dmlap","followers_url":"https://api.github.com/users/dmlap/followers","following_url":"https://api.github.com/users/dmlap/following{/other_user}","gists_url":"https://api.github.com/users/dmlap/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlap/subscriptions","organizations_url":"https://api.github.com/users/dmlap/orgs","repos_url":"https://api.github.com/users/dmlap/repos","events_url":"https://api.github.com/users/dmlap/events{/privacy}","received_events_url":"https://api.github.com/users/dmlap/received_events","type":"User","site_admin":false},"body":"Should those tests be invoking this method without segments?","created_at":"2015-03-20T16:08:42Z","updated_at":"2015-03-20T16:08:42Z","html_url":"https://github.com/videojs/videojs-contrib-hls/pull/229#discussion_r26851697","pull_request_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/comments/26851697"},"html":{"href":"https://github.com/videojs/videojs-contrib-hls/pull/229#discussion_r26851697"},"pull_request":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229","id":31295273,"html_url":"https://github.com/videojs/videojs-contrib-hls/pull/229","diff_url":"https://github.com/videojs/videojs-contrib-hls/pull/229.diff","patch_url":"https://github.com/videojs/videojs-contrib-hls/pull/229.patch","issue_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/229","number":229,"state":"open","locked":false,"title":"Live start time tweaks","user":{"login":"bc-bbay","id":9540928,"avatar_url":"https://avatars.githubusercontent.com/u/9540928?v=3","gravatar_id":"","url":"https://api.github.com/users/bc-bbay","html_url":"https://github.com/bc-bbay","followers_url":"https://api.github.com/users/bc-bbay/followers","following_url":"https://api.github.com/users/bc-bbay/following{/other_user}","gists_url":"https://api.github.com/users/bc-bbay/gists{/gist_id}","starred_url":"https://api.github.com/users/bc-bbay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bc-bbay/subscriptions","organizations_url":"https://api.github.com/users/bc-bbay/orgs","repos_url":"https://api.github.com/users/bc-bbay/repos","events_url":"https://api.github.com/users/bc-bbay/events{/privacy}","received_events_url":"https://api.github.com/users/bc-bbay/received_events","type":"User","site_admin":false},"body":"Moving live start time calculation earlier in the code flow to eliminate a race condition, repeating it on first play to create a smooth experience, and making sure currentTime is updated to match these changes.","created_at":"2015-03-16T23:36:21Z","updated_at":"2015-03-20T16:08:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf15775e522e4b4ca65774a7e008c879a67104c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229/commits","review_comments_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229/comments","review_comment_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/229/comments","statuses_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/statuses/21ab74c37d7f6109fe279320b23da47d4b94acd1","head":{"label":"videojs:live-start-time","ref":"live-start-time","sha":"21ab74c37d7f6109fe279320b23da47d4b94acd1","user":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"repo":{"id":14029328,"name":"videojs-contrib-hls","full_name":"videojs/videojs-contrib-hls","owner":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/videojs/videojs-contrib-hls","description":"HLS library for video.js","fork":false,"url":"https://api.github.com/repos/videojs/videojs-contrib-hls","forks_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/forks","keys_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/teams","hooks_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/hooks","issue_events_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/events{/number}","events_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/events","assignees_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/assignees{/user}","branches_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/branches{/branch}","tags_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/tags","blobs_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/refs{/sha}","trees_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/statuses/{sha}","languages_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/languages","stargazers_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/stargazers","contributors_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/contributors","subscribers_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/subscribers","subscription_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/subscription","commits_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/commits{/sha}","git_commits_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/commits{/sha}","comments_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/comments{/number}","issue_comment_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/comments{/number}","contents_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/contents/{+path}","compare_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/merges","archive_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/downloads","issues_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues{/number}","pulls_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls{/number}","milestones_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/milestones{/number}","notifications_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/labels{/name}","releases_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/releases{/id}","created_at":"2013-10-31T21:55:21Z","updated_at":"2015-03-19T18:58:19Z","pushed_at":"2015-03-20T02:23:14Z","git_url":"git://github.com/videojs/videojs-contrib-hls.git","ssh_url":"git@github.com:videojs/videojs-contrib-hls.git","clone_url":"https://github.com/videojs/videojs-contrib-hls.git","svn_url":"https://github.com/videojs/videojs-contrib-hls","homepage":null,"size":21777,"stargazers_count":144,"watchers_count":144,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":81,"mirror_url":null,"open_issues_count":40,"forks":81,"open_issues":40,"watchers":144,"default_branch":"master"}},"base":{"label":"videojs:master","ref":"master","sha":"4643387e717a6c2174fd0132d519ba3abb69581b","user":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"repo":{"id":14029328,"name":"videojs-contrib-hls","full_name":"videojs/videojs-contrib-hls","owner":{"login":"videojs","id":3287189,"avatar_url":"https://avatars.githubusercontent.com/u/3287189?v=3","gravatar_id":"","url":"https://api.github.com/users/videojs","html_url":"https://github.com/videojs","followers_url":"https://api.github.com/users/videojs/followers","following_url":"https://api.github.com/users/videojs/following{/other_user}","gists_url":"https://api.github.com/users/videojs/gists{/gist_id}","starred_url":"https://api.github.com/users/videojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videojs/subscriptions","organizations_url":"https://api.github.com/users/videojs/orgs","repos_url":"https://api.github.com/users/videojs/repos","events_url":"https://api.github.com/users/videojs/events{/privacy}","received_events_url":"https://api.github.com/users/videojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/videojs/videojs-contrib-hls","description":"HLS library for video.js","fork":false,"url":"https://api.github.com/repos/videojs/videojs-contrib-hls","forks_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/forks","keys_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/teams","hooks_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/hooks","issue_events_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/events{/number}","events_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/events","assignees_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/assignees{/user}","branches_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/branches{/branch}","tags_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/tags","blobs_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/refs{/sha}","trees_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/statuses/{sha}","languages_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/languages","stargazers_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/stargazers","contributors_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/contributors","subscribers_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/subscribers","subscription_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/subscription","commits_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/commits{/sha}","git_commits_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/git/commits{/sha}","comments_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/comments{/number}","issue_comment_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/comments{/number}","contents_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/contents/{+path}","compare_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/merges","archive_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/downloads","issues_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues{/number}","pulls_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls{/number}","milestones_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/milestones{/number}","notifications_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/labels{/name}","releases_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/releases{/id}","created_at":"2013-10-31T21:55:21Z","updated_at":"2015-03-19T18:58:19Z","pushed_at":"2015-03-20T02:23:14Z","git_url":"git://github.com/videojs/videojs-contrib-hls.git","ssh_url":"git@github.com:videojs/videojs-contrib-hls.git","clone_url":"https://github.com/videojs/videojs-contrib-hls.git","svn_url":"https://github.com/videojs/videojs-contrib-hls","homepage":null,"size":21777,"stargazers_count":144,"watchers_count":144,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":81,"mirror_url":null,"open_issues_count":40,"forks":81,"open_issues":40,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229"},"html":{"href":"https://github.com/videojs/videojs-contrib-hls/pull/229"},"issue":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/229"},"comments":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/videojs/videojs-contrib-hls/statuses/21ab74c37d7f6109fe279320b23da47d4b94acd1"}}}}