{"action":"created","issue":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/633","labels_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/633/comments","events_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/633/events","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/633","id":94307697,"number":633,"title":"clear buffer on seeking","user":{"login":"bwidtmann","id":5071747,"avatar_url":"https://avatars.githubusercontent.com/u/5071747?v=3","gravatar_id":"","url":"https://api.github.com/users/bwidtmann","html_url":"https://github.com/bwidtmann","followers_url":"https://api.github.com/users/bwidtmann/followers","following_url":"https://api.github.com/users/bwidtmann/following{/other_user}","gists_url":"https://api.github.com/users/bwidtmann/gists{/gist_id}","starred_url":"https://api.github.com/users/bwidtmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwidtmann/subscriptions","organizations_url":"https://api.github.com/users/bwidtmann/orgs","repos_url":"https://api.github.com/users/bwidtmann/repos","events_url":"https://api.github.com/users/bwidtmann/events{/privacy}","received_events_url":"https://api.github.com/users/bwidtmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-10T13:29:06Z","updated_at":"2015-07-13T07:41:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/pulls/633","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/633","diff_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/633.diff","patch_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/633.patch"},"body":"clear buffer on seeking to avoid playback stuck when video element has discarded buffers silently. For more details see discussion in Issue #240 "},"comment":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/comments/120839684","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/633#issuecomment-120839684","issue_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/633","id":120839684,"user":{"login":"KozhinM","id":1681697,"avatar_url":"https://avatars.githubusercontent.com/u/1681697?v=3","gravatar_id":"","url":"https://api.github.com/users/KozhinM","html_url":"https://github.com/KozhinM","followers_url":"https://api.github.com/users/KozhinM/followers","following_url":"https://api.github.com/users/KozhinM/following{/other_user}","gists_url":"https://api.github.com/users/KozhinM/gists{/gist_id}","starred_url":"https://api.github.com/users/KozhinM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KozhinM/subscriptions","organizations_url":"https://api.github.com/users/KozhinM/orgs","repos_url":"https://api.github.com/users/KozhinM/repos","events_url":"https://api.github.com/users/KozhinM/events{/privacy}","received_events_url":"https://api.github.com/users/KozhinM/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T07:41:56Z","updated_at":"2015-07-13T07:41:56Z","body":"@bwidtmann, thanks for the fix. I have a suggestion about how to avoid the performance issue a bit in case of frequent seeking. What if we clear the buffer only when we seek to the non-buffered position? For example, if the buffered range is 10-40s and currentTime = 20s I do not see the necessity for clearing the buffer when a user seeks to the 30th second. Besides, I believe it is better for the user experience as well - we would not make users wait till the buffer is fulfilled again after he or she just seeks one second before the playback position. \r\nThis should not bring much more complexity since we only need to check if currentTime after seeking is in the buffered range.\r\nThere is one concern I still have about clearing the buffer. What if the player has buffered content (say 30s ahead) with the highest quality, but due to some reasons the current quality is lower than the highest. When a user seek, the content with the highest quality will be removed and then replaced with the lower quality, which I think is no desirable. I understand that this is not a common case and I think that handling such a case is not a trivial task and may really bring complexity, so I am not insisting on solving this right now, but we need to keep it in mind."}}