{"action":"created","issue":{"url":"https://api.github.com/repos/vimeo/player.js/issues/165","repository_url":"https://api.github.com/repos/vimeo/player.js","labels_url":"https://api.github.com/repos/vimeo/player.js/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/vimeo/player.js/issues/165/comments","events_url":"https://api.github.com/repos/vimeo/player.js/issues/165/events","html_url":"https://github.com/vimeo/player.js/issues/165","id":260365534,"node_id":"MDU6SXNzdWUyNjAzNjU1MzQ=","number":165,"title":"No way to catch errors on instantiation ","user":{"login":"rijk","id":159500,"node_id":"MDQ6VXNlcjE1OTUwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/159500?v=4","gravatar_id":"","url":"https://api.github.com/users/rijk","html_url":"https://github.com/rijk","followers_url":"https://api.github.com/users/rijk/followers","following_url":"https://api.github.com/users/rijk/following{/other_user}","gists_url":"https://api.github.com/users/rijk/gists{/gist_id}","starred_url":"https://api.github.com/users/rijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rijk/subscriptions","organizations_url":"https://api.github.com/users/rijk/orgs","repos_url":"https://api.github.com/users/rijk/repos","events_url":"https://api.github.com/users/rijk/events{/privacy}","received_events_url":"https://api.github.com/users/rijk/received_events","type":"User","site_admin":false},"labels":[{"id":340685713,"node_id":"MDU6TGFiZWwzNDA2ODU3MTM=","url":"https://api.github.com/repos/vimeo/player.js/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":{"login":"tenacex","id":10394694,"node_id":"MDQ6VXNlcjEwMzk0Njk0","avatar_url":"https://avatars3.githubusercontent.com/u/10394694?v=4","gravatar_id":"","url":"https://api.github.com/users/tenacex","html_url":"https://github.com/tenacex","followers_url":"https://api.github.com/users/tenacex/followers","following_url":"https://api.github.com/users/tenacex/following{/other_user}","gists_url":"https://api.github.com/users/tenacex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenacex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenacex/subscriptions","organizations_url":"https://api.github.com/users/tenacex/orgs","repos_url":"https://api.github.com/users/tenacex/repos","events_url":"https://api.github.com/users/tenacex/events{/privacy}","received_events_url":"https://api.github.com/users/tenacex/received_events","type":"User","site_admin":false},"assignees":[{"login":"tenacex","id":10394694,"node_id":"MDQ6VXNlcjEwMzk0Njk0","avatar_url":"https://avatars3.githubusercontent.com/u/10394694?v=4","gravatar_id":"","url":"https://api.github.com/users/tenacex","html_url":"https://github.com/tenacex","followers_url":"https://api.github.com/users/tenacex/followers","following_url":"https://api.github.com/users/tenacex/following{/other_user}","gists_url":"https://api.github.com/users/tenacex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenacex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenacex/subscriptions","organizations_url":"https://api.github.com/users/tenacex/orgs","repos_url":"https://api.github.com/users/tenacex/repos","events_url":"https://api.github.com/users/tenacex/events{/privacy}","received_events_url":"https://api.github.com/users/tenacex/received_events","type":"User","site_admin":false}],"milestone":null,"comments":24,"created_at":"2017-09-25T18:05:41Z","updated_at":"2018-06-12T15:08:38Z","closed_at":null,"author_association":"NONE","body":"This was first mentioned in #57, but note that it is a separate issue hence the new ticket.\r\n\r\nWhen instantiating a player with `new Vimeo.Player()` with a URL that triggers a 404 (not found) or 403 (privacy settings) error, there is no way to catch this error.\r\n\r\n### Expected Behavior\r\n\r\n```\r\nplayer = new Vimeo.Player( ... ) // with private video ID\r\nplayer.on( 'error', ... )\r\n```\r\n\r\nError handler is called.\r\n\r\n### Actual Behavior\r\n\r\nError handler is not called.\r\n\r\n### Steps to Reproduce\r\n\r\nSee above\r\n\r\n<!--\r\nIf you cannot reproduce on the demo page, please link to the page where you’re seeing the issue. It’s helpful for us if you can make a test case using [CodePen](https://codepen.io), [JSFiddle](https://jsfiddle.net), or something similar.\r\n-->\r\n\r\n---\r\n\r\nThis makes for pretty terrible UX when the player is embedded in a webapp. The user gets no visual feedback from the player; it just doesn't load. And since no error handler is called it's also impossible to give feedback via the app interface about it. \r\n\r\nThe only way is around it is to use `loadVideo`, which does give you a way to intercept errors (although this doesn't work sometimes either, that's what #57 is about). The problem here is, there is no way to create a player without first setting a video url and therefore loading it, as the player on instantiation checks the iframe for a valid source and blows up if it doesn't find one. So we have to do a workaround of initially set a url to a small dummy video to get the player instantiated, and then call `loadVideo` to load the actual video and check for errors.\r\n\r\nPlease give us some way to catch errors during instantiation. 🙏"},"comment":{"url":"https://api.github.com/repos/vimeo/player.js/issues/comments/396624486","html_url":"https://github.com/vimeo/player.js/issues/165#issuecomment-396624486","issue_url":"https://api.github.com/repos/vimeo/player.js/issues/165","id":396624486,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjYyNDQ4Ng==","user":{"login":"Silviu-Marian","id":1747499,"node_id":"MDQ6VXNlcjE3NDc0OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1747499?v=4","gravatar_id":"","url":"https://api.github.com/users/Silviu-Marian","html_url":"https://github.com/Silviu-Marian","followers_url":"https://api.github.com/users/Silviu-Marian/followers","following_url":"https://api.github.com/users/Silviu-Marian/following{/other_user}","gists_url":"https://api.github.com/users/Silviu-Marian/gists{/gist_id}","starred_url":"https://api.github.com/users/Silviu-Marian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Silviu-Marian/subscriptions","organizations_url":"https://api.github.com/users/Silviu-Marian/orgs","repos_url":"https://api.github.com/users/Silviu-Marian/repos","events_url":"https://api.github.com/users/Silviu-Marian/events{/privacy}","received_events_url":"https://api.github.com/users/Silviu-Marian/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T15:08:38Z","updated_at":"2018-06-12T15:08:38Z","author_association":"NONE","body":"Still in PR?\r\n"}}
{"actor":{"display_login":"Silviu-Marian"}}