{"action":"created","comment":{"url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments/96221199","pull_request_review_id":16795920,"id":96221199,"diff_hunk":"@@ -29,23 +29,55 @@ domReady(function() {\n     },\n     onClick: function onClick(event) {\n       var menuItem = this.$$('.vjs-menu-item', this.el_.parentNode);\n+      var el = event.currentTarget;\n       Array.from(menuItem).forEach(function(caption) {\n         caption.classList.remove('vjs-selected');\n       });\n-      var el = event.currentTarget;\n       el.classList.add('vjs-selected');\n-      this.player_.caption_lang = this.el_.dataset.lang;\n-      this.player_.trigger('changelanguagetranscripts');\n-    },\n+\n+      var tracks = this.player_.textTracks();\n+      for (var i = 0; i < tracks.length; i++) {\n+        var track = tracks[i];\n+        if (track.kind === 'captions') {\n+          this.player_.captionsLanguage = el.dataset.lang;\n+          track.mode = track.language === this.player_.captionsLanguage ? 'showing': 'disabled';\n+        }\n+      }\n+      this.player_.trigger('captionstrackchange');\n+      this.player_.trigger('subtitlestrackchange');\n+      this.player_.trigger('currentlanguagechanged');\n+    }\n   });\n \n   var MenuButton = videojs.getComponent('MenuButton');\n+  var ClickableComponent = videojs.getComponent('ClickableComponent');\n+\n   var ToggleButton = videojs.extend(MenuButton, {\n     // base class for create buttons for caption and transcripts\n     constructor: function constructor(player, options) {\n       this.kind_ = 'captions';\n-      MenuButton.call(this, player, options);\n+\n+      ClickableComponent.call(this, player, options);\n+\n+      if (!this.player_.singleton_menu) {\n+        this.update();\n+        this.player_.singleton_menu = this.menu;\n+      } else {\n+        this.menu = this.player_.singleton_menu;\n+      }\n+\n+      this.enabled_ = true;","path":"video_xblock/static/js/toggle-button.js","position":46,"original_position":46,"commit_id":"bfabc5999e3b7ed9ee5af8d2647e0e5b2858d4fa","original_commit_id":"bfabc5999e3b7ed9ee5af8d2647e0e5b2858d4fa","user":{"login":"auraz","id":67241,"avatar_url":"https://avatars.githubusercontent.com/u/67241?v=3","gravatar_id":"","url":"https://api.github.com/users/auraz","html_url":"https://github.com/auraz","followers_url":"https://api.github.com/users/auraz/followers","following_url":"https://api.github.com/users/auraz/following{/other_user}","gists_url":"https://api.github.com/users/auraz/gists{/gist_id}","starred_url":"https://api.github.com/users/auraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auraz/subscriptions","organizations_url":"https://api.github.com/users/auraz/orgs","repos_url":"https://api.github.com/users/auraz/repos","events_url":"https://api.github.com/users/auraz/events{/privacy}","received_events_url":"https://api.github.com/users/auraz/received_events","type":"User","site_admin":false},"body":"What is this? Where are comments? ","created_at":"2017-01-16T12:43:14Z","updated_at":"2017-01-16T12:51:32Z","html_url":"https://github.com/raccoongang/xblock-video/pull/71#discussion_r96221199","pull_request_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments/96221199"},"html":{"href":"https://github.com/raccoongang/xblock-video/pull/71#discussion_r96221199"},"pull_request":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71","id":101492457,"html_url":"https://github.com/raccoongang/xblock-video/pull/71","diff_url":"https://github.com/raccoongang/xblock-video/pull/71.diff","patch_url":"https://github.com/raccoongang/xblock-video/pull/71.patch","issue_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/71","number":71,"state":"open","locked":false,"title":"Captions and transcripts delivery","user":{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false},"body":"Features delivered:\r\n- Display captions. Non-draggable.\r\n- Interactive transcripts\r\n- Transcripts download button","created_at":"2017-01-13T18:21:14Z","updated_at":"2017-01-16T12:51:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"168d1842a5b649497ed0059876b126dd3d395539","assignee":{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false},"assignees":[{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71/commits","review_comments_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71/comments","review_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/71/comments","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/bfabc5999e3b7ed9ee5af8d2647e0e5b2858d4fa","head":{"label":"raccoongang:dev","ref":"dev","sha":"bfabc5999e3b7ed9ee5af8d2647e0e5b2858d4fa","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":72450225,"name":"xblock-video","full_name":"raccoongang/xblock-video","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/xblock-video","description":"Universal Video XBlock with pluggable backend for many video hosting providers","fork":true,"url":"https://api.github.com/repos/raccoongang/xblock-video","forks_url":"https://api.github.com/repos/raccoongang/xblock-video/forks","keys_url":"https://api.github.com/repos/raccoongang/xblock-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/xblock-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/xblock-video/teams","hooks_url":"https://api.github.com/repos/raccoongang/xblock-video/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/xblock-video/events","assignees_url":"https://api.github.com/repos/raccoongang/xblock-video/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/xblock-video/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/xblock-video/tags","blobs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/xblock-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/xblock-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/xblock-video/languages","stargazers_url":"https://api.github.com/repos/raccoongang/xblock-video/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/xblock-video/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/xblock-video/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/xblock-video/subscription","commits_url":"https://api.github.com/repos/raccoongang/xblock-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/xblock-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/xblock-video/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/xblock-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/xblock-video/merges","archive_url":"https://api.github.com/repos/raccoongang/xblock-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/xblock-video/downloads","issues_url":"https://api.github.com/repos/raccoongang/xblock-video/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/xblock-video/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/xblock-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/xblock-video/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/xblock-video/releases{/id}","deployments_url":"https://api.github.com/repos/raccoongang/xblock-video/deployments","created_at":"2016-10-31T15:30:25Z","updated_at":"2017-01-04T21:57:41Z","pushed_at":"2017-01-16T11:59:11Z","git_url":"git://github.com/raccoongang/xblock-video.git","ssh_url":"git@github.com:raccoongang/xblock-video.git","clone_url":"https://github.com/raccoongang/xblock-video.git","svn_url":"https://github.com/raccoongang/xblock-video","homepage":null,"size":1361,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"raccoongang:master","ref":"master","sha":"135ae8090ff65c011aebb158cb64259552f1c199","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":72450225,"name":"xblock-video","full_name":"raccoongang/xblock-video","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/xblock-video","description":"Universal Video XBlock with pluggable backend for many video hosting providers","fork":true,"url":"https://api.github.com/repos/raccoongang/xblock-video","forks_url":"https://api.github.com/repos/raccoongang/xblock-video/forks","keys_url":"https://api.github.com/repos/raccoongang/xblock-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/xblock-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/xblock-video/teams","hooks_url":"https://api.github.com/repos/raccoongang/xblock-video/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/xblock-video/events","assignees_url":"https://api.github.com/repos/raccoongang/xblock-video/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/xblock-video/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/xblock-video/tags","blobs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/xblock-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/xblock-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/xblock-video/languages","stargazers_url":"https://api.github.com/repos/raccoongang/xblock-video/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/xblock-video/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/xblock-video/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/xblock-video/subscription","commits_url":"https://api.github.com/repos/raccoongang/xblock-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/xblock-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/xblock-video/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/xblock-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/xblock-video/merges","archive_url":"https://api.github.com/repos/raccoongang/xblock-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/xblock-video/downloads","issues_url":"https://api.github.com/repos/raccoongang/xblock-video/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/xblock-video/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/xblock-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/xblock-video/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/xblock-video/releases{/id}","deployments_url":"https://api.github.com/repos/raccoongang/xblock-video/deployments","created_at":"2016-10-31T15:30:25Z","updated_at":"2017-01-04T21:57:41Z","pushed_at":"2017-01-16T11:59:11Z","git_url":"git://github.com/raccoongang/xblock-video.git","ssh_url":"git@github.com:raccoongang/xblock-video.git","clone_url":"https://github.com/raccoongang/xblock-video.git","svn_url":"https://github.com/raccoongang/xblock-video","homepage":null,"size":1361,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71"},"html":{"href":"https://github.com/raccoongang/xblock-video/pull/71"},"issue":{"href":"https://api.github.com/repos/raccoongang/xblock-video/issues/71"},"comments":{"href":"https://api.github.com/repos/raccoongang/xblock-video/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/raccoongang/xblock-video/statuses/bfabc5999e3b7ed9ee5af8d2647e0e5b2858d4fa"}}}}
{"actor":{"display_login":"auraz"}}