{"action":"created","comment":{"url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/comments/198257363","pull_request_review_id":132155719,"id":198257363,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODI1NzM2Mw==","diff_hunk":"@@ -0,0 +1,203 @@\n+import React from 'react'\n+import cn from 'classnames'\n+import PropTypes from 'prop-types'\n+\n+export default class VideoPlayer extends React.PureComponent {\n+  static defaultProps = {\n+    playerId: 'rkcQq7gAe',\n+    videoId: '5450137526001',\n+    theme: 'default',\n+    isLooped: false,\n+    isMuted: false,\n+    hasAutoplay: true,\n+    hasControls: true,\n+    hasBreakpoints: false,\n+  }\n+\n+  static propTypes = {\n+    playerId: PropTypes.string.isRequired,\n+    videoId: PropTypes.string.isRequired,\n+    /** Player theme styles, must have correlating styles to go with it */\n+    theme: PropTypes.oneOf(['default', 'chapter']),\n+    /** Pass in a react component to be shown at the end of the video. */\n+    endscreenComponent: PropTypes.element,\n+    /**\n+     * Keeps video constrained to standard sizes, eg 1080x720.\n+     * Used to keep videos looking crisp.\n+     * Scales responsively.\n+     * */\n+    hasBreakpoints: PropTypes.bool,\n+    hasControls: PropTypes.bool,\n+    isMuted: PropTypes.bool,\n+    isLooped: PropTypes.bool,\n+    hasAutoplay: PropTypes.bool,\n+    /** Player has been initialized */\n+    onPlayerReady: PropTypes.func,\n+    /** Video is loaded and ready to play */\n+    onVideoReady: PropTypes.func,\n+    onPlay: PropTypes.func,\n+    onPause: PropTypes.func,\n+    onEnd: PropTypes.func,\n+    onTimeChange: PropTypes.func,\n+    onError: PropTypes.func,\n+  }\n+\n+  state = { endscreenOpen: false }\n+\n+  componentWillReceiveProps (nextProps) {\n+    if (this.props.videoId !== nextProps.videoId) {\n+      this.replaceWith(nextProps.videoId)\n+    }\n+  }\n+\n+  componentDidMount () {\n+    if (window.bc && window.videojs) {\n+      window.bc(this.playerRef, {\n+        playbackRates: [0.5, 1, 1.5, 2],\n+      })\n+      this.video = window.videojs(this.playerRef)\n+      this.video.ready(this.handlePlayerReady)\n+    }\n+  }\n+\n+  handlePlayerReady = () => {\n+    if (this.props.onPlay) {\n+      this.video.on('play', () => {\n+        this.props.onPlay(this.video)","path":"src/components/VideoPlayer/index.js","position":66,"original_position":66,"commit_id":"5b1aa4465466b10066787fa876a4fcd9ecaadeca","original_commit_id":"5b1aa4465466b10066787fa876a4fcd9ecaadeca","user":{"login":"bernabe9","id":18464392,"node_id":"MDQ6VXNlcjE4NDY0Mzky","avatar_url":"https://avatars1.githubusercontent.com/u/18464392?v=4","gravatar_id":"","url":"https://api.github.com/users/bernabe9","html_url":"https://github.com/bernabe9","followers_url":"https://api.github.com/users/bernabe9/followers","following_url":"https://api.github.com/users/bernabe9/following{/other_user}","gists_url":"https://api.github.com/users/bernabe9/gists{/gist_id}","starred_url":"https://api.github.com/users/bernabe9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernabe9/subscriptions","organizations_url":"https://api.github.com/users/bernabe9/orgs","repos_url":"https://api.github.com/users/bernabe9/repos","events_url":"https://api.github.com/users/bernabe9/events{/privacy}","received_events_url":"https://api.github.com/users/bernabe9/received_events","type":"User","site_admin":false},"body":"use object destructuring for the props inside `this.props`","created_at":"2018-06-26T18:44:27Z","updated_at":"2018-06-26T18:44:27Z","html_url":"https://github.com/yankaindustries/mc-components/pull/43#discussion_r198257363","pull_request_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/comments/198257363"},"html":{"href":"https://github.com/yankaindustries/mc-components/pull/43#discussion_r198257363"},"pull_request":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43","id":196848920,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODQ4OTIw","html_url":"https://github.com/yankaindustries/mc-components/pull/43","diff_url":"https://github.com/yankaindustries/mc-components/pull/43.diff","patch_url":"https://github.com/yankaindustries/mc-components/pull/43.patch","issue_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/43","number":43,"state":"open","locked":false,"title":"VideoPlayer component","user":{"login":"a-axton","id":4015654,"node_id":"MDQ6VXNlcjQwMTU2NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4015654?v=4","gravatar_id":"","url":"https://api.github.com/users/a-axton","html_url":"https://github.com/a-axton","followers_url":"https://api.github.com/users/a-axton/followers","following_url":"https://api.github.com/users/a-axton/following{/other_user}","gists_url":"https://api.github.com/users/a-axton/gists{/gist_id}","starred_url":"https://api.github.com/users/a-axton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-axton/subscriptions","organizations_url":"https://api.github.com/users/a-axton/orgs","repos_url":"https://api.github.com/users/a-axton/repos","events_url":"https://api.github.com/users/a-axton/events{/privacy}","received_events_url":"https://api.github.com/users/a-axton/received_events","type":"User","site_admin":false},"body":"Added a VideoPlayer component for brightcove video players. It's mostly a proof of concept until we try to use it in a feature. It may need some changes to make it more redux friendly, eg allowing props to be updated after creation and adding prop for pausing/playing the video.\r\n\r\n## Risks\r\nNone\r\n\r\n## Changes\r\nNo changes to existing components\r\n\r\n","created_at":"2018-06-22T21:25:21Z","updated_at":"2018-06-26T18:44:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03a7434a9470b621f8f2abe3898c7200a98973df","assignee":null,"assignees":[],"requested_reviewers":[{"login":"stephenp","id":505670,"node_id":"MDQ6VXNlcjUwNTY3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/505670?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenp","html_url":"https://github.com/stephenp","followers_url":"https://api.github.com/users/stephenp/followers","following_url":"https://api.github.com/users/stephenp/following{/other_user}","gists_url":"https://api.github.com/users/stephenp/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenp/subscriptions","organizations_url":"https://api.github.com/users/stephenp/orgs","repos_url":"https://api.github.com/users/stephenp/repos","events_url":"https://api.github.com/users/stephenp/events{/privacy}","received_events_url":"https://api.github.com/users/stephenp/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43/commits","review_comments_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43/comments","review_comment_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/43/comments","statuses_url":"https://api.github.com/repos/yankaindustries/mc-components/statuses/5b1aa4465466b10066787fa876a4fcd9ecaadeca","head":{"label":"yankaindustries:video-player","ref":"video-player","sha":"5b1aa4465466b10066787fa876a4fcd9ecaadeca","user":{"login":"yankaindustries","id":7400681,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDA2ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7400681?v=4","gravatar_id":"","url":"https://api.github.com/users/yankaindustries","html_url":"https://github.com/yankaindustries","followers_url":"https://api.github.com/users/yankaindustries/followers","following_url":"https://api.github.com/users/yankaindustries/following{/other_user}","gists_url":"https://api.github.com/users/yankaindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/yankaindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yankaindustries/subscriptions","organizations_url":"https://api.github.com/users/yankaindustries/orgs","repos_url":"https://api.github.com/users/yankaindustries/repos","events_url":"https://api.github.com/users/yankaindustries/events{/privacy}","received_events_url":"https://api.github.com/users/yankaindustries/received_events","type":"Organization","site_admin":false},"repo":{"id":137250508,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyNTA1MDg=","name":"mc-components","full_name":"yankaindustries/mc-components","owner":{"login":"yankaindustries","id":7400681,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDA2ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7400681?v=4","gravatar_id":"","url":"https://api.github.com/users/yankaindustries","html_url":"https://github.com/yankaindustries","followers_url":"https://api.github.com/users/yankaindustries/followers","following_url":"https://api.github.com/users/yankaindustries/following{/other_user}","gists_url":"https://api.github.com/users/yankaindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/yankaindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yankaindustries/subscriptions","organizations_url":"https://api.github.com/users/yankaindustries/orgs","repos_url":"https://api.github.com/users/yankaindustries/repos","events_url":"https://api.github.com/users/yankaindustries/events{/privacy}","received_events_url":"https://api.github.com/users/yankaindustries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yankaindustries/mc-components","description":"Components library and core styles for Masterclass","fork":false,"url":"https://api.github.com/repos/yankaindustries/mc-components","forks_url":"https://api.github.com/repos/yankaindustries/mc-components/forks","keys_url":"https://api.github.com/repos/yankaindustries/mc-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yankaindustries/mc-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yankaindustries/mc-components/teams","hooks_url":"https://api.github.com/repos/yankaindustries/mc-components/hooks","issue_events_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/events{/number}","events_url":"https://api.github.com/repos/yankaindustries/mc-components/events","assignees_url":"https://api.github.com/repos/yankaindustries/mc-components/assignees{/user}","branches_url":"https://api.github.com/repos/yankaindustries/mc-components/branches{/branch}","tags_url":"https://api.github.com/repos/yankaindustries/mc-components/tags","blobs_url":"https://api.github.com/repos/yankaindustries/mc-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yankaindustries/mc-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yankaindustries/mc-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/yankaindustries/mc-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yankaindustries/mc-components/statuses/{sha}","languages_url":"https://api.github.com/repos/yankaindustries/mc-components/languages","stargazers_url":"https://api.github.com/repos/yankaindustries/mc-components/stargazers","contributors_url":"https://api.github.com/repos/yankaindustries/mc-components/contributors","subscribers_url":"https://api.github.com/repos/yankaindustries/mc-components/subscribers","subscription_url":"https://api.github.com/repos/yankaindustries/mc-components/subscription","commits_url":"https://api.github.com/repos/yankaindustries/mc-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/yankaindustries/mc-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/yankaindustries/mc-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/yankaindustries/mc-components/contents/{+path}","compare_url":"https://api.github.com/repos/yankaindustries/mc-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yankaindustries/mc-components/merges","archive_url":"https://api.github.com/repos/yankaindustries/mc-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yankaindustries/mc-components/downloads","issues_url":"https://api.github.com/repos/yankaindustries/mc-components/issues{/number}","pulls_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls{/number}","milestones_url":"https://api.github.com/repos/yankaindustries/mc-components/milestones{/number}","notifications_url":"https://api.github.com/repos/yankaindustries/mc-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yankaindustries/mc-components/labels{/name}","releases_url":"https://api.github.com/repos/yankaindustries/mc-components/releases{/id}","deployments_url":"https://api.github.com/repos/yankaindustries/mc-components/deployments","created_at":"2018-06-13T17:43:35Z","updated_at":"2018-06-22T21:29:36Z","pushed_at":"2018-06-26T17:08:19Z","git_url":"git://github.com/yankaindustries/mc-components.git","ssh_url":"git@github.com:yankaindustries/mc-components.git","clone_url":"https://github.com/yankaindustries/mc-components.git","svn_url":"https://github.com/yankaindustries/mc-components","homepage":"https://yankaindustries.github.io/mc-components","size":1299,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":1,"open_issues":10,"watchers":0,"default_branch":"develop"}},"base":{"label":"yankaindustries:develop","ref":"develop","sha":"f18d6405bf6b26ef0930f2507231f7b046dc1883","user":{"login":"yankaindustries","id":7400681,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDA2ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7400681?v=4","gravatar_id":"","url":"https://api.github.com/users/yankaindustries","html_url":"https://github.com/yankaindustries","followers_url":"https://api.github.com/users/yankaindustries/followers","following_url":"https://api.github.com/users/yankaindustries/following{/other_user}","gists_url":"https://api.github.com/users/yankaindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/yankaindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yankaindustries/subscriptions","organizations_url":"https://api.github.com/users/yankaindustries/orgs","repos_url":"https://api.github.com/users/yankaindustries/repos","events_url":"https://api.github.com/users/yankaindustries/events{/privacy}","received_events_url":"https://api.github.com/users/yankaindustries/received_events","type":"Organization","site_admin":false},"repo":{"id":137250508,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyNTA1MDg=","name":"mc-components","full_name":"yankaindustries/mc-components","owner":{"login":"yankaindustries","id":7400681,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDA2ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7400681?v=4","gravatar_id":"","url":"https://api.github.com/users/yankaindustries","html_url":"https://github.com/yankaindustries","followers_url":"https://api.github.com/users/yankaindustries/followers","following_url":"https://api.github.com/users/yankaindustries/following{/other_user}","gists_url":"https://api.github.com/users/yankaindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/yankaindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yankaindustries/subscriptions","organizations_url":"https://api.github.com/users/yankaindustries/orgs","repos_url":"https://api.github.com/users/yankaindustries/repos","events_url":"https://api.github.com/users/yankaindustries/events{/privacy}","received_events_url":"https://api.github.com/users/yankaindustries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yankaindustries/mc-components","description":"Components library and core styles for Masterclass","fork":false,"url":"https://api.github.com/repos/yankaindustries/mc-components","forks_url":"https://api.github.com/repos/yankaindustries/mc-components/forks","keys_url":"https://api.github.com/repos/yankaindustries/mc-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yankaindustries/mc-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yankaindustries/mc-components/teams","hooks_url":"https://api.github.com/repos/yankaindustries/mc-components/hooks","issue_events_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/events{/number}","events_url":"https://api.github.com/repos/yankaindustries/mc-components/events","assignees_url":"https://api.github.com/repos/yankaindustries/mc-components/assignees{/user}","branches_url":"https://api.github.com/repos/yankaindustries/mc-components/branches{/branch}","tags_url":"https://api.github.com/repos/yankaindustries/mc-components/tags","blobs_url":"https://api.github.com/repos/yankaindustries/mc-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yankaindustries/mc-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yankaindustries/mc-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/yankaindustries/mc-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yankaindustries/mc-components/statuses/{sha}","languages_url":"https://api.github.com/repos/yankaindustries/mc-components/languages","stargazers_url":"https://api.github.com/repos/yankaindustries/mc-components/stargazers","contributors_url":"https://api.github.com/repos/yankaindustries/mc-components/contributors","subscribers_url":"https://api.github.com/repos/yankaindustries/mc-components/subscribers","subscription_url":"https://api.github.com/repos/yankaindustries/mc-components/subscription","commits_url":"https://api.github.com/repos/yankaindustries/mc-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/yankaindustries/mc-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/yankaindustries/mc-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/yankaindustries/mc-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/yankaindustries/mc-components/contents/{+path}","compare_url":"https://api.github.com/repos/yankaindustries/mc-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yankaindustries/mc-components/merges","archive_url":"https://api.github.com/repos/yankaindustries/mc-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yankaindustries/mc-components/downloads","issues_url":"https://api.github.com/repos/yankaindustries/mc-components/issues{/number}","pulls_url":"https://api.github.com/repos/yankaindustries/mc-components/pulls{/number}","milestones_url":"https://api.github.com/repos/yankaindustries/mc-components/milestones{/number}","notifications_url":"https://api.github.com/repos/yankaindustries/mc-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yankaindustries/mc-components/labels{/name}","releases_url":"https://api.github.com/repos/yankaindustries/mc-components/releases{/id}","deployments_url":"https://api.github.com/repos/yankaindustries/mc-components/deployments","created_at":"2018-06-13T17:43:35Z","updated_at":"2018-06-22T21:29:36Z","pushed_at":"2018-06-26T17:08:19Z","git_url":"git://github.com/yankaindustries/mc-components.git","ssh_url":"git@github.com:yankaindustries/mc-components.git","clone_url":"https://github.com/yankaindustries/mc-components.git","svn_url":"https://github.com/yankaindustries/mc-components","homepage":"https://yankaindustries.github.io/mc-components","size":1299,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":1,"open_issues":10,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43"},"html":{"href":"https://github.com/yankaindustries/mc-components/pull/43"},"issue":{"href":"https://api.github.com/repos/yankaindustries/mc-components/issues/43"},"comments":{"href":"https://api.github.com/repos/yankaindustries/mc-components/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yankaindustries/mc-components/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/yankaindustries/mc-components/statuses/5b1aa4465466b10066787fa876a4fcd9ecaadeca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bernabe9"}}