{"action":"created","issue":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/1255","repository_url":"https://api.github.com/repos/google/ExoPlayer","labels_url":"https://api.github.com/repos/google/ExoPlayer/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/google/ExoPlayer/issues/1255/comments","events_url":"https://api.github.com/repos/google/ExoPlayer/issues/1255/events","html_url":"https://github.com/google/ExoPlayer/issues/1255","id":132941332,"number":1255,"title":"Get duration of online mp3 file","user":{"login":"PavelKorolev","id":4147260,"avatar_url":"https://avatars.githubusercontent.com/u/4147260?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelKorolev","html_url":"https://github.com/PavelKorolev","followers_url":"https://api.github.com/users/PavelKorolev/followers","following_url":"https://api.github.com/users/PavelKorolev/following{/other_user}","gists_url":"https://api.github.com/users/PavelKorolev/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelKorolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelKorolev/subscriptions","organizations_url":"https://api.github.com/users/PavelKorolev/orgs","repos_url":"https://api.github.com/users/PavelKorolev/repos","events_url":"https://api.github.com/users/PavelKorolev/events{/privacy}","received_events_url":"https://api.github.com/users/PavelKorolev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-11T10:51:01Z","updated_at":"2016-02-11T12:15:41Z","closed_at":null,"body":"I wonder when it's safe to `getDuration()` of the audio track. I just need it once as fast as possible. \r\nWhen I try to get it immediately after `exoPlayer.prepare()` then I get `UNKNOWN_TIME`.\r\nDidn't find an example in demo project. \r\nLooks like I need to do it in listener when playback status changed to `ExoPlayer.STATE_READY`, but then there will be useless getDuration on each play/pause action."},"comment":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/comments/182831895","html_url":"https://github.com/google/ExoPlayer/issues/1255#issuecomment-182831895","issue_url":"https://api.github.com/repos/google/ExoPlayer/issues/1255","id":182831895,"user":{"login":"ojw28","id":7881572,"avatar_url":"https://avatars.githubusercontent.com/u/7881572?v=3","gravatar_id":"","url":"https://api.github.com/users/ojw28","html_url":"https://github.com/ojw28","followers_url":"https://api.github.com/users/ojw28/followers","following_url":"https://api.github.com/users/ojw28/following{/other_user}","gists_url":"https://api.github.com/users/ojw28/gists{/gist_id}","starred_url":"https://api.github.com/users/ojw28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojw28/subscriptions","organizations_url":"https://api.github.com/users/ojw28/orgs","repos_url":"https://api.github.com/users/ojw28/repos","events_url":"https://api.github.com/users/ojw28/events{/privacy}","received_events_url":"https://api.github.com/users/ojw28/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T12:15:41Z","updated_at":"2016-02-11T12:15:41Z","body":"\r\n\r\nIf your code is going to have useless calls on each action, why don't you just have a boolean so that you only do it once?"}}