{"action":"created","issue":{"url":"https://api.github.com/repos/googleads/videojs-ima/issues/217","repository_url":"https://api.github.com/repos/googleads/videojs-ima","labels_url":"https://api.github.com/repos/googleads/videojs-ima/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/googleads/videojs-ima/issues/217/comments","events_url":"https://api.github.com/repos/googleads/videojs-ima/issues/217/events","html_url":"https://github.com/googleads/videojs-ima/pull/217","id":150048836,"number":217,"title":"Add data from AdError and AdErrorEvent on adserror","user":{"login":"hendrauzia","id":546587,"avatar_url":"https://avatars.githubusercontent.com/u/546587?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrauzia","html_url":"https://github.com/hendrauzia","followers_url":"https://api.github.com/users/hendrauzia/followers","following_url":"https://api.github.com/users/hendrauzia/following{/other_user}","gists_url":"https://api.github.com/users/hendrauzia/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrauzia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrauzia/subscriptions","organizations_url":"https://api.github.com/users/hendrauzia/orgs","repos_url":"https://api.github.com/users/hendrauzia/repos","events_url":"https://api.github.com/users/hendrauzia/events{/privacy}","received_events_url":"https://api.github.com/users/hendrauzia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-21T11:39:52Z","updated_at":"2016-04-22T14:37:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/googleads/videojs-ima/pulls/217","html_url":"https://github.com/googleads/videojs-ima/pull/217","diff_url":"https://github.com/googleads/videojs-ima/pull/217.diff","patch_url":"https://github.com/googleads/videojs-ima/pull/217.patch"},"body":"Error events are triggered without any specific information regarding the error, therefore clients can't debug if something's wrong with the ad integration. I propose adding `data` attribute into the dispatched event with attributes, which are: `AdError` and `AdErrorEvent`.\r\n\r\nFollowing is an example of how to use this patch.\r\n\r\n```\r\nplayer.on(\"adserror\", function(event){\r\n  console.log(event.data.AdError) // prints google.ima.AdError object\r\n  console.log(event.data.AdErrorEvent) // prints google.ima.AdErrorEvent object\r\n});\r\n```\r\n\r\nI am currently implementing a client using videojs-ima integration, and have a hard time of debugging issues and collecting adserror related information. I hope this patch can be accepted, tests are included.\r\n\r\nI have also submitted the corporate CLA, I'm not sure if you have received it. Please let me know if there's anything more I have to add."},"comment":{"url":"https://api.github.com/repos/googleads/videojs-ima/issues/comments/213451596","html_url":"https://github.com/googleads/videojs-ima/pull/217#issuecomment-213451596","issue_url":"https://api.github.com/repos/googleads/videojs-ima/issues/217","id":213451596,"user":{"login":"hendrauzia","id":546587,"avatar_url":"https://avatars.githubusercontent.com/u/546587?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrauzia","html_url":"https://github.com/hendrauzia","followers_url":"https://api.github.com/users/hendrauzia/followers","following_url":"https://api.github.com/users/hendrauzia/following{/other_user}","gists_url":"https://api.github.com/users/hendrauzia/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrauzia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrauzia/subscriptions","organizations_url":"https://api.github.com/users/hendrauzia/orgs","repos_url":"https://api.github.com/users/hendrauzia/repos","events_url":"https://api.github.com/users/hendrauzia/events{/privacy}","received_events_url":"https://api.github.com/users/hendrauzia/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T14:37:34Z","updated_at":"2016-04-22T14:37:34Z","body":"Re-submitted the CLA and signed using my name."}}