{"action":"created","issue":{"url":"https://api.github.com/repos/Selz/plyr/issues/272","repository_url":"https://api.github.com/repos/Selz/plyr","labels_url":"https://api.github.com/repos/Selz/plyr/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/Selz/plyr/issues/272/comments","events_url":"https://api.github.com/repos/Selz/plyr/issues/272/events","html_url":"https://github.com/Selz/plyr/issues/272","id":159579818,"number":272,"title":"Destroy/Restore YouTube not working?","user":{"login":"danielsarin","id":3842168,"avatar_url":"https://avatars.githubusercontent.com/u/3842168?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsarin","html_url":"https://github.com/danielsarin","followers_url":"https://api.github.com/users/danielsarin/followers","following_url":"https://api.github.com/users/danielsarin/following{/other_user}","gists_url":"https://api.github.com/users/danielsarin/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsarin/subscriptions","organizations_url":"https://api.github.com/users/danielsarin/orgs","repos_url":"https://api.github.com/users/danielsarin/repos","events_url":"https://api.github.com/users/danielsarin/events{/privacy}","received_events_url":"https://api.github.com/users/danielsarin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Selz/plyr/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"SamPotts","id":719092,"avatar_url":"https://avatars.githubusercontent.com/u/719092?v=3","gravatar_id":"","url":"https://api.github.com/users/SamPotts","html_url":"https://github.com/SamPotts","followers_url":"https://api.github.com/users/SamPotts/followers","following_url":"https://api.github.com/users/SamPotts/following{/other_user}","gists_url":"https://api.github.com/users/SamPotts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamPotts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamPotts/subscriptions","organizations_url":"https://api.github.com/users/SamPotts/orgs","repos_url":"https://api.github.com/users/SamPotts/repos","events_url":"https://api.github.com/users/SamPotts/events{/privacy}","received_events_url":"https://api.github.com/users/SamPotts/received_events","type":"User","site_admin":false},"assignees":[{"login":"SamPotts","id":719092,"avatar_url":"https://avatars.githubusercontent.com/u/719092?v=3","gravatar_id":"","url":"https://api.github.com/users/SamPotts","html_url":"https://github.com/SamPotts","followers_url":"https://api.github.com/users/SamPotts/followers","following_url":"https://api.github.com/users/SamPotts/following{/other_user}","gists_url":"https://api.github.com/users/SamPotts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamPotts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamPotts/subscriptions","organizations_url":"https://api.github.com/users/SamPotts/orgs","repos_url":"https://api.github.com/users/SamPotts/repos","events_url":"https://api.github.com/users/SamPotts/events{/privacy}","received_events_url":"https://api.github.com/users/SamPotts/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-06-10T07:59:29Z","updated_at":"2016-08-21T09:57:19Z","closed_at":"2016-08-21T09:57:19Z","body":"Hi,\r\n\r\nI'm trying to destroy a YouTube instance and then restore it, but it doesn't seem to work. The docs do not mention that these methods wouldn't work for YouTube as well.\r\n\r\nMy HTML is\r\n\r\n`<div data-type=\"youtube\" data-video-id=\"12345\"></div>`\r\n\r\nand js\r\n\r\n```\r\nvideos = plyr.setup({});\r\n```\r\n\r\nIn the docs it says\r\n\r\n> Destroys the plyr UI and any media event listeners, effectively restoring to the previous state before setup() was called.\r\n\r\nWhen I call `videos[0].plyr.destroy()`it doesn't restore the original HTML, though I don't know if it should.\r\n\r\nBut when I call `videos[0].plyr.restore()` it gives me an error:\r\n\r\n_Uncaught TypeError: Cannot set property 'buffered' of undefined_\r\n\r\nI made a fiddle: https://jsfiddle.net/f1hc53cq/2/\r\n\r\nIs there something I'm doing wrong?\r\n\r\nThanks for any help,\r\nDaniel"},"comment":{"url":"https://api.github.com/repos/Selz/plyr/issues/comments/241248620","html_url":"https://github.com/Selz/plyr/issues/272#issuecomment-241248620","issue_url":"https://api.github.com/repos/Selz/plyr/issues/272","id":241248620,"user":{"login":"SamPotts","id":719092,"avatar_url":"https://avatars.githubusercontent.com/u/719092?v=3","gravatar_id":"","url":"https://api.github.com/users/SamPotts","html_url":"https://github.com/SamPotts","followers_url":"https://api.github.com/users/SamPotts/followers","following_url":"https://api.github.com/users/SamPotts/following{/other_user}","gists_url":"https://api.github.com/users/SamPotts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamPotts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamPotts/subscriptions","organizations_url":"https://api.github.com/users/SamPotts/orgs","repos_url":"https://api.github.com/users/SamPotts/repos","events_url":"https://api.github.com/users/SamPotts/events{/privacy}","received_events_url":"https://api.github.com/users/SamPotts/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T09:57:19Z","updated_at":"2016-08-21T09:57:19Z","body":"This should be fixed in v1.9.0 - could you give it a go? Bear in mind there were also several breaking changes so check the [changelog](https://github.com/Selz/plyr/blob/master/changelog.md)"}}
{"actor":{"display_login":"SamPotts"}}