{"action":"created","issue":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/652","labels_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/652/labels{/name}","comments_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/652/comments","events_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/652/events","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/652","id":96360343,"number":652,"title":"Fix live offset when availabilityStartTime in future","user":{"login":"bbcrddave","id":5390145,"avatar_url":"https://avatars.githubusercontent.com/u/5390145?v=3","gravatar_id":"","url":"https://api.github.com/users/bbcrddave","html_url":"https://github.com/bbcrddave","followers_url":"https://api.github.com/users/bbcrddave/followers","following_url":"https://api.github.com/users/bbcrddave/following{/other_user}","gists_url":"https://api.github.com/users/bbcrddave/gists{/gist_id}","starred_url":"https://api.github.com/users/bbcrddave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbcrddave/subscriptions","organizations_url":"https://api.github.com/users/bbcrddave/orgs","repos_url":"https://api.github.com/users/bbcrddave/repos","events_url":"https://api.github.com/users/bbcrddave/events{/privacy}","received_events_url":"https://api.github.com/users/bbcrddave/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-21T16:29:07Z","updated_at":"2015-07-22T02:50:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/pulls/652","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/652","diff_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/652.diff","patch_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/652.patch"},"body":"Following 33e5a74, streams which have availabilityStartTime in the future would fail to play. This is because the live edge calculated in onLiveEdgeSearchCompleted changed to be a runtime configured value of multiples of segment duration which turned out to be more than the hardcoded delay in postponeUpdate. The outcome was that startTime would be calculated to be negative and a valid segment at which to start could never be found.\r\n\r\nFix by ensuring postponeUpdate waits the same amount of time as will subsequently be subtracted, and also belt and braced by ensuring that startTime can never be negative.\r\n\r\nThere are probably a ton of other magic numbers we need to weed out, but this was noticed as we are currently experimenting with publishing manifest with future aSTs and they were failing to play.\r\n\r\nI believe this is causing the second issue in #613."},"comment":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/comments/123544353","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/652#issuecomment-123544353","issue_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/652","id":123544353,"user":{"login":"AkamaiDASH","id":7864462,"avatar_url":"https://avatars.githubusercontent.com/u/7864462?v=3","gravatar_id":"","url":"https://api.github.com/users/AkamaiDASH","html_url":"https://github.com/AkamaiDASH","followers_url":"https://api.github.com/users/AkamaiDASH/followers","following_url":"https://api.github.com/users/AkamaiDASH/following{/other_user}","gists_url":"https://api.github.com/users/AkamaiDASH/gists{/gist_id}","starred_url":"https://api.github.com/users/AkamaiDASH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AkamaiDASH/subscriptions","organizations_url":"https://api.github.com/users/AkamaiDASH/orgs","repos_url":"https://api.github.com/users/AkamaiDASH/repos","events_url":"https://api.github.com/users/AkamaiDASH/events{/privacy}","received_events_url":"https://api.github.com/users/AkamaiDASH/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T02:50:59Z","updated_at":"2015-07-22T02:50:59Z","body":"@bbcrddave :+1:  All the changes seem logical - I am not fully up to speed with the use case but I think I get all the parts.  Ill merge in tomorrow give some time for others to look at it. "}}