{"action":"created","issue":{"url":"https://api.github.com/repos/google/shaka-player/issues/80","labels_url":"https://api.github.com/repos/google/shaka-player/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/google/shaka-player/issues/80/comments","events_url":"https://api.github.com/repos/google/shaka-player/issues/80/events","html_url":"https://github.com/google/shaka-player/issues/80","id":76028138,"number":80,"title":"Should unload method set src to empty string?","user":{"login":"JobaDiniz","id":165290,"avatar_url":"https://avatars.githubusercontent.com/u/165290?v=3","gravatar_id":"","url":"https://api.github.com/users/JobaDiniz","html_url":"https://github.com/JobaDiniz","followers_url":"https://api.github.com/users/JobaDiniz/followers","following_url":"https://api.github.com/users/JobaDiniz/following{/other_user}","gists_url":"https://api.github.com/users/JobaDiniz/gists{/gist_id}","starred_url":"https://api.github.com/users/JobaDiniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobaDiniz/subscriptions","organizations_url":"https://api.github.com/users/JobaDiniz/orgs","repos_url":"https://api.github.com/users/JobaDiniz/repos","events_url":"https://api.github.com/users/JobaDiniz/events{/privacy}","received_events_url":"https://api.github.com/users/JobaDiniz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/shaka-player/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars.githubusercontent.com/u/6843156?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"milestone":null,"comments":17,"created_at":"2015-05-13T15:35:44Z","updated_at":"2015-06-12T15:24:52Z","closed_at":null,"body":"Is it ok to set the video *src* attribute to an empty string?\r\nWhen I call *unload* method, html5 video player throws an error: *MEDIA_ERR_SRC_NOT_SUPPORTED*\r\n\r\n[This line of code](https://github.com/google/shaka-player/blob/master/lib/player/player.js#L230) sets *src* to empty string, but according to *W3* this shouldn't be done: \r\n\r\n> The attribute, if present, must contain a valid non-empty URL potentially surrounded by spaces - [attr-media-src](http://dev.w3.org/html5/spec-author-view/video.html#attr-media-src)\r\n\r\n> A string is a valid non-empty URL potentially surrounded by spaces if, after stripping leading and trailing whitespace from it, it is a valid non-empty URL - [valid-non-empty-url-potentially-surrounded-by-spaces](http://dev.w3.org/html5/spec-author-view/urls.html#valid-non-empty-url-potentially-surrounded-by-spaces)\r\n\r\n> A string is a valid non-empty URL if it is a valid URL but it is not the empty string. - [valid-non-empty-url](http://www.w3.org/html/wg/drafts/html/master/single-page.html#valid-non-empty-url)"},"comment":{"url":"https://api.github.com/repos/google/shaka-player/issues/comments/111525699","html_url":"https://github.com/google/shaka-player/issues/80#issuecomment-111525699","issue_url":"https://api.github.com/repos/google/shaka-player/issues/80","id":111525699,"user":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars.githubusercontent.com/u/6843156?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T15:24:52Z","updated_at":"2015-06-12T15:24:52Z","body":"It's very simple, and there's an example in app.js:\r\n\r\nplayer.addEventListener('error', function(event) {\r\n  console.error(event);  // or whatever else you need to do with it\r\n});\r\n\r\nThis pattern can be found in the test app and the samples in the tutorial.\r\n\r\nWould it be helpful to call this out more explicitly in the docs somewhere?"}}