{"action":"created","comment":{"url":"https://api.github.com/repos/jwplayer/hls.js/pulls/comments/209068338","pull_request_review_id":145012512,"id":209068338,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTA2ODMzOA==","diff_hunk":"@@ -882,28 +875,21 @@ class Cea608Parser {\n      * @returns {Boolean} Tells if a command was found\n      */\n   parseCmd (a, b) {\n-    let chNr = null;\n+    let chNr = getChannelNumber(a);\n \n-    let cond1 = (a === 0x14 || a === 0x1C) && (b >= 0x20 && b <= 0x2F);\n+    let cond1 = chNr && (b >= 0x20 && b <= 0x2F);\n     let cond2 = (a === 0x17 || a === 0x1F) && (b >= 0x21 && b <= 0x23);\n     if (!(cond1 || cond2))\n       return false;\n \n-    if (a === this.lastCmdA && b === this.lastCmdB) {\n-      this.lastCmdA = null;\n-      this.lastCmdB = null; // Repeated commands are dropped (once)\n+    if (this._isCmdRepeated(a, b)) {\n+      this._setLastCmd(null, null);\n       logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');\n       return true;\n     }\n \n-    if (a === 0x14 || a === 0x17)\n-      chNr = 1;\n-    else\n-      chNr = 2; // (a === 0x1C || a=== 0x1f)\n-\n-    let channel = this.channels[chNr - 1];\n-\n-    if (a === 0x14 || a === 0x1C) {\n+    let channel = this.channels[chNr];","path":"src/utils/cea-608-parser.js","position":123,"original_position":123,"commit_id":"9e668393888e7174c06d3995ddb66d94adba7b24","original_commit_id":"9e668393888e7174c06d3995ddb66d94adba7b24","user":{"login":"robwalch","id":333258,"node_id":"MDQ6VXNlcjMzMzI1OA==","avatar_url":"https://avatars1.githubusercontent.com/u/333258?v=4","gravatar_id":"","url":"https://api.github.com/users/robwalch","html_url":"https://github.com/robwalch","followers_url":"https://api.github.com/users/robwalch/followers","following_url":"https://api.github.com/users/robwalch/following{/other_user}","gists_url":"https://api.github.com/users/robwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/robwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwalch/subscriptions","organizations_url":"https://api.github.com/users/robwalch/orgs","repos_url":"https://api.github.com/users/robwalch/repos","events_url":"https://api.github.com/users/robwalch/events{/privacy}","received_events_url":"https://api.github.com/users/robwalch/received_events","type":"User","site_admin":false},"body":"A lot of these lets should be consts.","created_at":"2018-08-09T20:29:53Z","updated_at":"2018-08-09T20:36:22Z","html_url":"https://github.com/jwplayer/hls.js/pull/166#discussion_r209068338","pull_request_url":"https://api.github.com/repos/jwplayer/hls.js/pulls/166","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/comments/209068338"},"html":{"href":"https://github.com/jwplayer/hls.js/pull/166#discussion_r209068338"},"pull_request":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/jwplayer/hls.js/pulls/166","id":207365144,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MzY1MTQ0","html_url":"https://github.com/jwplayer/hls.js/pull/166","diff_url":"https://github.com/jwplayer/hls.js/pull/166.diff","patch_url":"https://github.com/jwplayer/hls.js/pull/166.patch","issue_url":"https://api.github.com/repos/jwplayer/hls.js/issues/166","number":166,"state":"open","locked":false,"title":"Enable support for 4 608/708 channels","user":{"login":"johnBartos","id":5042276,"node_id":"MDQ6VXNlcjUwNDIyNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5042276?v=4","gravatar_id":"","url":"https://api.github.com/users/johnBartos","html_url":"https://github.com/johnBartos","followers_url":"https://api.github.com/users/johnBartos/followers","following_url":"https://api.github.com/users/johnBartos/following{/other_user}","gists_url":"https://api.github.com/users/johnBartos/gists{/gist_id}","starred_url":"https://api.github.com/users/johnBartos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnBartos/subscriptions","organizations_url":"https://api.github.com/users/johnBartos/orgs","repos_url":"https://api.github.com/users/johnBartos/repos","events_url":"https://api.github.com/users/johnBartos/events{/privacy}","received_events_url":"https://api.github.com/users/johnBartos/received_events","type":"User","site_admin":false},"body":"### This PR will...\r\n- Parse captions bytes from fields 1 and 3\r\n- Modify the 608 parser to work with multiple cc fields. Previous bytes labeled as \"channels\" are now referred to as data channels, and are addressed relatively (i.e. field 3 datachannel 1 is equal to cc channel 3)\r\n- Split captions overlap fix over the two fields\r\n\r\n### Why is this Pull Request needed?\r\nSo that customers whose streams have captions on CC1 & CC3 can support both tracks.\r\n\r\n### Are there any points in the code the reviewer needs to double check?\r\nDo we need to add config options label/lang of 3 and 4? Maybe in upstream but I don't think we need it here.\r\n\r\n### Resolves issues:\r\nJW8-1701\r\n\r\n","created_at":"2018-08-09T15:57:37Z","updated_at":"2018-08-09T20:36:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54901fb941de05ac5c177519428e44aac2d03efb","assignee":null,"assignees":[],"requested_reviewers":[{"login":"DanFerrer","id":6787010,"node_id":"MDQ6VXNlcjY3ODcwMTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6787010?v=4","gravatar_id":"","url":"https://api.github.com/users/DanFerrer","html_url":"https://github.com/DanFerrer","followers_url":"https://api.github.com/users/DanFerrer/followers","following_url":"https://api.github.com/users/DanFerrer/following{/other_user}","gists_url":"https://api.github.com/users/DanFerrer/gists{/gist_id}","starred_url":"https://api.github.com/users/DanFerrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanFerrer/subscriptions","organizations_url":"https://api.github.com/users/DanFerrer/orgs","repos_url":"https://api.github.com/users/DanFerrer/repos","events_url":"https://api.github.com/users/DanFerrer/events{/privacy}","received_events_url":"https://api.github.com/users/DanFerrer/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":466355317,"node_id":"MDU6TGFiZWw0NjYzNTUzMTc=","url":"https://api.github.com/repos/jwplayer/hls.js/labels/bug","name":"bug","color":"ee0701","default":true},{"id":466355319,"node_id":"MDU6TGFiZWw0NjYzNTUzMTk=","url":"https://api.github.com/repos/jwplayer/hls.js/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/jwplayer/hls.js/milestones/32","html_url":"https://github.com/jwplayer/hls.js/milestone/32","labels_url":"https://api.github.com/repos/jwplayer/hls.js/milestones/32/labels","id":3504183,"node_id":"MDk6TWlsZXN0b25lMzUwNDE4Mw==","number":32,"title":"8.5.0","description":null,"creator":{"login":"johnBartos","id":5042276,"node_id":"MDQ6VXNlcjUwNDIyNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5042276?v=4","gravatar_id":"","url":"https://api.github.com/users/johnBartos","html_url":"https://github.com/johnBartos","followers_url":"https://api.github.com/users/johnBartos/followers","following_url":"https://api.github.com/users/johnBartos/following{/other_user}","gists_url":"https://api.github.com/users/johnBartos/gists{/gist_id}","starred_url":"https://api.github.com/users/johnBartos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnBartos/subscriptions","organizations_url":"https://api.github.com/users/johnBartos/orgs","repos_url":"https://api.github.com/users/johnBartos/repos","events_url":"https://api.github.com/users/johnBartos/events{/privacy}","received_events_url":"https://api.github.com/users/johnBartos/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2018-07-17T22:38:12Z","updated_at":"2018-08-09T15:57:37Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jwplayer/hls.js/pulls/166/commits","review_comments_url":"https://api.github.com/repos/jwplayer/hls.js/pulls/166/comments","review_comment_url":"https://api.github.com/repos/jwplayer/hls.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwplayer/hls.js/issues/166/comments","statuses_url":"https://api.github.com/repos/jwplayer/hls.js/statuses/9e668393888e7174c06d3995ddb66d94adba7b24","head":{"label":"jwplayer:bugfix/608-cc3","ref":"bugfix/608-cc3","sha":"9e668393888e7174c06d3995ddb66d94adba7b24","user":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":71589822,"node_id":"MDEwOlJlcG9zaXRvcnk3MTU4OTgyMg==","name":"hls.js","full_name":"jwplayer/hls.js","owner":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jwplayer/hls.js","description":"MSE-based HLS client - http://dailymotion.github.io/hls.js/demo","fork":true,"url":"https://api.github.com/repos/jwplayer/hls.js","forks_url":"https://api.github.com/repos/jwplayer/hls.js/forks","keys_url":"https://api.github.com/repos/jwplayer/hls.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/hls.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/hls.js/teams","hooks_url":"https://api.github.com/repos/jwplayer/hls.js/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/hls.js/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/hls.js/events","assignees_url":"https://api.github.com/repos/jwplayer/hls.js/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/hls.js/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/hls.js/tags","blobs_url":"https://api.github.com/repos/jwplayer/hls.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/hls.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/hls.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/hls.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/hls.js/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/hls.js/languages","stargazers_url":"https://api.github.com/repos/jwplayer/hls.js/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/hls.js/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/hls.js/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/hls.js/subscription","commits_url":"https://api.github.com/repos/jwplayer/hls.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/hls.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/hls.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/hls.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/hls.js/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/hls.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/hls.js/merges","archive_url":"https://api.github.com/repos/jwplayer/hls.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/hls.js/downloads","issues_url":"https://api.github.com/repos/jwplayer/hls.js/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/hls.js/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/hls.js/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/hls.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/hls.js/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/hls.js/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/hls.js/deployments","created_at":"2016-10-21T19:09:57Z","updated_at":"2018-08-07T15:39:26Z","pushed_at":"2018-08-09T19:16:48Z","git_url":"git://github.com/jwplayer/hls.js.git","ssh_url":"git@github.com:jwplayer/hls.js.git","clone_url":"https://github.com/jwplayer/hls.js.git","svn_url":"https://github.com/jwplayer/hls.js","homepage":"","size":72679,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":3,"watchers":9,"default_branch":"master"}},"base":{"label":"jwplayer:master","ref":"master","sha":"3ef13be524f3bf0833cf236b02de8d6efe71ab90","user":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":71589822,"node_id":"MDEwOlJlcG9zaXRvcnk3MTU4OTgyMg==","name":"hls.js","full_name":"jwplayer/hls.js","owner":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jwplayer/hls.js","description":"MSE-based HLS client - http://dailymotion.github.io/hls.js/demo","fork":true,"url":"https://api.github.com/repos/jwplayer/hls.js","forks_url":"https://api.github.com/repos/jwplayer/hls.js/forks","keys_url":"https://api.github.com/repos/jwplayer/hls.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/hls.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/hls.js/teams","hooks_url":"https://api.github.com/repos/jwplayer/hls.js/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/hls.js/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/hls.js/events","assignees_url":"https://api.github.com/repos/jwplayer/hls.js/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/hls.js/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/hls.js/tags","blobs_url":"https://api.github.com/repos/jwplayer/hls.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/hls.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/hls.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/hls.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/hls.js/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/hls.js/languages","stargazers_url":"https://api.github.com/repos/jwplayer/hls.js/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/hls.js/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/hls.js/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/hls.js/subscription","commits_url":"https://api.github.com/repos/jwplayer/hls.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/hls.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/hls.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/hls.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/hls.js/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/hls.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/hls.js/merges","archive_url":"https://api.github.com/repos/jwplayer/hls.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/hls.js/downloads","issues_url":"https://api.github.com/repos/jwplayer/hls.js/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/hls.js/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/hls.js/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/hls.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/hls.js/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/hls.js/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/hls.js/deployments","created_at":"2016-10-21T19:09:57Z","updated_at":"2018-08-07T15:39:26Z","pushed_at":"2018-08-09T19:16:48Z","git_url":"git://github.com/jwplayer/hls.js.git","ssh_url":"git@github.com:jwplayer/hls.js.git","clone_url":"https://github.com/jwplayer/hls.js.git","svn_url":"https://github.com/jwplayer/hls.js","homepage":"","size":72679,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/166"},"html":{"href":"https://github.com/jwplayer/hls.js/pull/166"},"issue":{"href":"https://api.github.com/repos/jwplayer/hls.js/issues/166"},"comments":{"href":"https://api.github.com/repos/jwplayer/hls.js/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwplayer/hls.js/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/jwplayer/hls.js/statuses/9e668393888e7174c06d3995ddb66d94adba7b24"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"robwalch"}}