{"action":"created","comment":{"url":"https://api.github.com/repos/clappr/clappr/pulls/comments/47449983","id":47449983,"diff_hunk":"@@ -174,6 +178,22 @@ export default class Player extends BaseObject {\n     }\n   }\n \n+  registerOptionEventListeners() {","path":"src/components/player.js","position":30,"original_position":30,"commit_id":"79571521242848eb5b10b14f232685d7c3d53b03","original_commit_id":"79571521242848eb5b10b14f232685d7c3d53b03","user":{"login":"leandromoreira","id":55913,"avatar_url":"https://avatars.githubusercontent.com/u/55913?v=3","gravatar_id":"","url":"https://api.github.com/users/leandromoreira","html_url":"https://github.com/leandromoreira","followers_url":"https://api.github.com/users/leandromoreira/followers","following_url":"https://api.github.com/users/leandromoreira/following{/other_user}","gists_url":"https://api.github.com/users/leandromoreira/gists{/gist_id}","starred_url":"https://api.github.com/users/leandromoreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandromoreira/subscriptions","organizations_url":"https://api.github.com/users/leandromoreira/orgs","repos_url":"https://api.github.com/users/leandromoreira/repos","events_url":"https://api.github.com/users/leandromoreira/events{/privacy}","received_events_url":"https://api.github.com/users/leandromoreira/received_events","type":"User","site_admin":false},"body":"I'd rather explicitly to use a mapping of events than this, it might let the code clear.\r\n\r\n```javascript\r\nvar eventsMapping = {\r\n  \"onPlay\": Events.PLAYER_PLAY,\r\n  \"onStop\": Events.PLAYER_STOP,\r\n}\r\nvar userEvents = this.options.events || {}\r\n\r\nObject.keys(userEvents).forEach((userEvent) => {\r\n  this.listenTo(eventsMapping[userEvent], userEvents[userEvent])\r\n})\r\n```","created_at":"2015-12-13T20:52:06Z","updated_at":"2015-12-13T20:52:06Z","html_url":"https://github.com/clappr/clappr/pull/736#discussion_r47449983","pull_request_url":"https://api.github.com/repos/clappr/clappr/pulls/736","_links":{"self":{"href":"https://api.github.com/repos/clappr/clappr/pulls/comments/47449983"},"html":{"href":"https://github.com/clappr/clappr/pull/736#discussion_r47449983"},"pull_request":{"href":"https://api.github.com/repos/clappr/clappr/pulls/736"}}},"pull_request":{"url":"https://api.github.com/repos/clappr/clappr/pulls/736","id":53505783,"html_url":"https://github.com/clappr/clappr/pull/736","diff_url":"https://github.com/clappr/clappr/pull/736.diff","patch_url":"https://github.com/clappr/clappr/pull/736.patch","issue_url":"https://api.github.com/repos/clappr/clappr/issues/736","number":736,"state":"open","locked":false,"title":"Added 'events' property to options","user":{"login":"tjenkinson","id":3259993,"avatar_url":"https://avatars.githubusercontent.com/u/3259993?v=3","gravatar_id":"","url":"https://api.github.com/users/tjenkinson","html_url":"https://github.com/tjenkinson","followers_url":"https://api.github.com/users/tjenkinson/followers","following_url":"https://api.github.com/users/tjenkinson/following{/other_user}","gists_url":"https://api.github.com/users/tjenkinson/gists{/gist_id}","starred_url":"https://api.github.com/users/tjenkinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjenkinson/subscriptions","organizations_url":"https://api.github.com/users/tjenkinson/orgs","repos_url":"https://api.github.com/users/tjenkinson/repos","events_url":"https://api.github.com/users/tjenkinson/events{/privacy}","received_events_url":"https://api.github.com/users/tjenkinson/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-13T18:21:48Z","updated_at":"2015-12-13T20:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b63822152b8608f853b6b33d2878f1951267f2c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clappr/clappr/pulls/736/commits","review_comments_url":"https://api.github.com/repos/clappr/clappr/pulls/736/comments","review_comment_url":"https://api.github.com/repos/clappr/clappr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clappr/clappr/issues/736/comments","statuses_url":"https://api.github.com/repos/clappr/clappr/statuses/79571521242848eb5b10b14f232685d7c3d53b03","head":{"label":"clappr:feat-events-in-config","ref":"feat-events-in-config","sha":"79571521242848eb5b10b14f232685d7c3d53b03","user":{"login":"clappr","id":10685859,"avatar_url":"https://avatars.githubusercontent.com/u/10685859?v=3","gravatar_id":"","url":"https://api.github.com/users/clappr","html_url":"https://github.com/clappr","followers_url":"https://api.github.com/users/clappr/followers","following_url":"https://api.github.com/users/clappr/following{/other_user}","gists_url":"https://api.github.com/users/clappr/gists{/gist_id}","starred_url":"https://api.github.com/users/clappr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clappr/subscriptions","organizations_url":"https://api.github.com/users/clappr/orgs","repos_url":"https://api.github.com/users/clappr/repos","events_url":"https://api.github.com/users/clappr/events{/privacy}","received_events_url":"https://api.github.com/users/clappr/received_events","type":"Organization","site_admin":false},"repo":{"id":16844474,"name":"clappr","full_name":"clappr/clappr","owner":{"login":"clappr","id":10685859,"avatar_url":"https://avatars.githubusercontent.com/u/10685859?v=3","gravatar_id":"","url":"https://api.github.com/users/clappr","html_url":"https://github.com/clappr","followers_url":"https://api.github.com/users/clappr/followers","following_url":"https://api.github.com/users/clappr/following{/other_user}","gists_url":"https://api.github.com/users/clappr/gists{/gist_id}","starred_url":"https://api.github.com/users/clappr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clappr/subscriptions","organizations_url":"https://api.github.com/users/clappr/orgs","repos_url":"https://api.github.com/users/clappr/repos","events_url":"https://api.github.com/users/clappr/events{/privacy}","received_events_url":"https://api.github.com/users/clappr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clappr/clappr","description":":clapper: An extensible media player for the web","fork":false,"url":"https://api.github.com/repos/clappr/clappr","forks_url":"https://api.github.com/repos/clappr/clappr/forks","keys_url":"https://api.github.com/repos/clappr/clappr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clappr/clappr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clappr/clappr/teams","hooks_url":"https://api.github.com/repos/clappr/clappr/hooks","issue_events_url":"https://api.github.com/repos/clappr/clappr/issues/events{/number}","events_url":"https://api.github.com/repos/clappr/clappr/events","assignees_url":"https://api.github.com/repos/clappr/clappr/assignees{/user}","branches_url":"https://api.github.com/repos/clappr/clappr/branches{/branch}","tags_url":"https://api.github.com/repos/clappr/clappr/tags","blobs_url":"https://api.github.com/repos/clappr/clappr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clappr/clappr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clappr/clappr/git/refs{/sha}","trees_url":"https://api.github.com/repos/clappr/clappr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clappr/clappr/statuses/{sha}","languages_url":"https://api.github.com/repos/clappr/clappr/languages","stargazers_url":"https://api.github.com/repos/clappr/clappr/stargazers","contributors_url":"https://api.github.com/repos/clappr/clappr/contributors","subscribers_url":"https://api.github.com/repos/clappr/clappr/subscribers","subscription_url":"https://api.github.com/repos/clappr/clappr/subscription","commits_url":"https://api.github.com/repos/clappr/clappr/commits{/sha}","git_commits_url":"https://api.github.com/repos/clappr/clappr/git/commits{/sha}","comments_url":"https://api.github.com/repos/clappr/clappr/comments{/number}","issue_comment_url":"https://api.github.com/repos/clappr/clappr/issues/comments{/number}","contents_url":"https://api.github.com/repos/clappr/clappr/contents/{+path}","compare_url":"https://api.github.com/repos/clappr/clappr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clappr/clappr/merges","archive_url":"https://api.github.com/repos/clappr/clappr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clappr/clappr/downloads","issues_url":"https://api.github.com/repos/clappr/clappr/issues{/number}","pulls_url":"https://api.github.com/repos/clappr/clappr/pulls{/number}","milestones_url":"https://api.github.com/repos/clappr/clappr/milestones{/number}","notifications_url":"https://api.github.com/repos/clappr/clappr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clappr/clappr/labels{/name}","releases_url":"https://api.github.com/repos/clappr/clappr/releases{/id}","created_at":"2014-02-14T17:36:40Z","updated_at":"2015-12-13T16:29:14Z","pushed_at":"2015-12-13T18:22:32Z","git_url":"git://github.com/clappr/clappr.git","ssh_url":"git@github.com:clappr/clappr.git","clone_url":"https://github.com/clappr/clappr.git","svn_url":"https://github.com/clappr/clappr","homepage":"http://clappr.io","size":97589,"stargazers_count":2547,"watchers_count":2547,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":66,"forks":248,"open_issues":66,"watchers":2547,"default_branch":"master"}},"base":{"label":"clappr:master","ref":"master","sha":"f29af3af21cedce420033d9da4e166efc24ca1a1","user":{"login":"clappr","id":10685859,"avatar_url":"https://avatars.githubusercontent.com/u/10685859?v=3","gravatar_id":"","url":"https://api.github.com/users/clappr","html_url":"https://github.com/clappr","followers_url":"https://api.github.com/users/clappr/followers","following_url":"https://api.github.com/users/clappr/following{/other_user}","gists_url":"https://api.github.com/users/clappr/gists{/gist_id}","starred_url":"https://api.github.com/users/clappr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clappr/subscriptions","organizations_url":"https://api.github.com/users/clappr/orgs","repos_url":"https://api.github.com/users/clappr/repos","events_url":"https://api.github.com/users/clappr/events{/privacy}","received_events_url":"https://api.github.com/users/clappr/received_events","type":"Organization","site_admin":false},"repo":{"id":16844474,"name":"clappr","full_name":"clappr/clappr","owner":{"login":"clappr","id":10685859,"avatar_url":"https://avatars.githubusercontent.com/u/10685859?v=3","gravatar_id":"","url":"https://api.github.com/users/clappr","html_url":"https://github.com/clappr","followers_url":"https://api.github.com/users/clappr/followers","following_url":"https://api.github.com/users/clappr/following{/other_user}","gists_url":"https://api.github.com/users/clappr/gists{/gist_id}","starred_url":"https://api.github.com/users/clappr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clappr/subscriptions","organizations_url":"https://api.github.com/users/clappr/orgs","repos_url":"https://api.github.com/users/clappr/repos","events_url":"https://api.github.com/users/clappr/events{/privacy}","received_events_url":"https://api.github.com/users/clappr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clappr/clappr","description":":clapper: An extensible media player for the web","fork":false,"url":"https://api.github.com/repos/clappr/clappr","forks_url":"https://api.github.com/repos/clappr/clappr/forks","keys_url":"https://api.github.com/repos/clappr/clappr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clappr/clappr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clappr/clappr/teams","hooks_url":"https://api.github.com/repos/clappr/clappr/hooks","issue_events_url":"https://api.github.com/repos/clappr/clappr/issues/events{/number}","events_url":"https://api.github.com/repos/clappr/clappr/events","assignees_url":"https://api.github.com/repos/clappr/clappr/assignees{/user}","branches_url":"https://api.github.com/repos/clappr/clappr/branches{/branch}","tags_url":"https://api.github.com/repos/clappr/clappr/tags","blobs_url":"https://api.github.com/repos/clappr/clappr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clappr/clappr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clappr/clappr/git/refs{/sha}","trees_url":"https://api.github.com/repos/clappr/clappr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clappr/clappr/statuses/{sha}","languages_url":"https://api.github.com/repos/clappr/clappr/languages","stargazers_url":"https://api.github.com/repos/clappr/clappr/stargazers","contributors_url":"https://api.github.com/repos/clappr/clappr/contributors","subscribers_url":"https://api.github.com/repos/clappr/clappr/subscribers","subscription_url":"https://api.github.com/repos/clappr/clappr/subscription","commits_url":"https://api.github.com/repos/clappr/clappr/commits{/sha}","git_commits_url":"https://api.github.com/repos/clappr/clappr/git/commits{/sha}","comments_url":"https://api.github.com/repos/clappr/clappr/comments{/number}","issue_comment_url":"https://api.github.com/repos/clappr/clappr/issues/comments{/number}","contents_url":"https://api.github.com/repos/clappr/clappr/contents/{+path}","compare_url":"https://api.github.com/repos/clappr/clappr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clappr/clappr/merges","archive_url":"https://api.github.com/repos/clappr/clappr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clappr/clappr/downloads","issues_url":"https://api.github.com/repos/clappr/clappr/issues{/number}","pulls_url":"https://api.github.com/repos/clappr/clappr/pulls{/number}","milestones_url":"https://api.github.com/repos/clappr/clappr/milestones{/number}","notifications_url":"https://api.github.com/repos/clappr/clappr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clappr/clappr/labels{/name}","releases_url":"https://api.github.com/repos/clappr/clappr/releases{/id}","created_at":"2014-02-14T17:36:40Z","updated_at":"2015-12-13T16:29:14Z","pushed_at":"2015-12-13T18:22:32Z","git_url":"git://github.com/clappr/clappr.git","ssh_url":"git@github.com:clappr/clappr.git","clone_url":"https://github.com/clappr/clappr.git","svn_url":"https://github.com/clappr/clappr","homepage":"http://clappr.io","size":97589,"stargazers_count":2547,"watchers_count":2547,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":66,"forks":248,"open_issues":66,"watchers":2547,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clappr/clappr/pulls/736"},"html":{"href":"https://github.com/clappr/clappr/pull/736"},"issue":{"href":"https://api.github.com/repos/clappr/clappr/issues/736"},"comments":{"href":"https://api.github.com/repos/clappr/clappr/issues/736/comments"},"review_comments":{"href":"https://api.github.com/repos/clappr/clappr/pulls/736/comments"},"review_comment":{"href":"https://api.github.com/repos/clappr/clappr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clappr/clappr/pulls/736/commits"},"statuses":{"href":"https://api.github.com/repos/clappr/clappr/statuses/79571521242848eb5b10b14f232685d7c3d53b03"}}}}