{"action":"opened","issue":{"url":"https://api.github.com/repos/video-dev/hls.js/issues/1982","repository_url":"https://api.github.com/repos/video-dev/hls.js","labels_url":"https://api.github.com/repos/video-dev/hls.js/issues/1982/labels{/name}","comments_url":"https://api.github.com/repos/video-dev/hls.js/issues/1982/comments","events_url":"https://api.github.com/repos/video-dev/hls.js/issues/1982/events","html_url":"https://github.com/video-dev/hls.js/issues/1982","id":376304007,"node_id":"MDU6SXNzdWUzNzYzMDQwMDc=","number":1982,"title":"Starts in the middle of live streams instead of at the end","user":{"login":"sesse","id":238700,"node_id":"MDQ6VXNlcjIzODcwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/238700?v=4","gravatar_id":"","url":"https://api.github.com/users/sesse","html_url":"https://github.com/sesse","followers_url":"https://api.github.com/users/sesse/followers","following_url":"https://api.github.com/users/sesse/following{/other_user}","gists_url":"https://api.github.com/users/sesse/gists{/gist_id}","starred_url":"https://api.github.com/users/sesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sesse/subscriptions","organizations_url":"https://api.github.com/users/sesse/orgs","repos_url":"https://api.github.com/users/sesse/repos","events_url":"https://api.github.com/users/sesse/events{/privacy}","received_events_url":"https://api.github.com/users/sesse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-01T08:48:26Z","updated_at":"2018-11-01T08:48:26Z","closed_at":null,"author_association":"NONE","body":"### What version of Hls.js are you using?\r\nv0.11.0, also tested with latest canary. v0.9.1 works on Chrome, but not on Android.\r\n\r\n### What browser and OS are you using?\r\nChrome, Linux. Also tested Firefox, Linux and Chrome in Android (no difference).\r\n\r\n### Test stream:\r\nhttps://stream.plastkast.no:9096/ultimate.m3u8\r\nhttps://video-dev.github.io/hls.js/stable/demo/?src=https%3A%2F%2Fstream.plastkast.no%3A9096%2Fultimate.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImVuYWJsZVdvcmtlciI6dHJ1ZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xLCJ3aWRldmluZUxpY2Vuc2VVcmwiOiIifQ==\r\n\r\n### Checklist\r\n<!-- Replace [ ] with [x] to check off the list -->\r\n- [x] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues\r\n- [x] The issue occurs in the latest reference client on https://video-dev.github.io/hls.js/demo and not just on my page\r\n- [x] The issue occurs in the canary client on https://video-dev.github.io/hls.js/demo?version=canary and not just on my page\r\n- [x] The stream has correct Access-Control-Allow-Origin headers (CORS)\r\n- [x] There are no network errors such as 404s in the browser console when trying to play the stream\r\n\r\n### Steps to reproduce\r\n1. Please provide clear steps to reproduce your problem\r\n2. If the bug is intermittent, give a rough frequency\r\n\r\n### Expected behavior\r\nThe stream should start at the end (or close to the end). iOS gets this right, but somehow hls.js doesn't. Except _sometimes_ it does, and it seems to be better on v0.9.1. I can't get it to be right on Android in any case, though, but in Chrome, it's right maybe once out of four.\r\n\r\n### Actual behavior\r\nIt starts pretty much exactly in the middle of the playlist, no matter how long it is.\r\n\r\nThe log really indicates it tries to start at the end, but says “logger.js:37 [log] > live playlist, switching playlist, unknown, load middle frag : 87”. \r\n\r\n### Console output\r\n```\r\n[log] > loadSource:https://stream.plastkast.no:9096/ultimate.m3u8\r\nlogger.js:37 [log] > trigger BUFFER_RESET\r\nlogger.js:37 [log] > set autoLevelCapping:-1\r\nlogger.js:37 [log] > attachMedia\r\nlogger.js:37 [log] > media source opened\r\nlogger.js:37 [log] > manifest loaded,1 level(s) found, first bitrate:undefined\r\nlogger.js:37 [log] > startLoad(-1)\r\nlogger.js:37 [log] > switching to level 0\r\nlogger.js:37 [log] > main stream:STOPPED->IDLE\r\nlogger.js:37 [log] > audio tracks updated\r\nlogger.js:37 [log] > subtitle tracks updated\r\nlogger.js:37 [log] > live playlist, reload in 5614 ms\r\nlogger.js:37 [log] > level 0 loaded [0,173],duration:991.2115099999971\r\nlogger.js:37 [log] > live playlist - first load, unknown sliding\r\nlogger.js:37 [log] > configure startPosition to 973.2115099999971\r\nlogger.js:37 [log] > Loading initSegment of [0 ,173],level 0, currentTime:973.212,bufferEnd:973.212\r\nlogger.js:37 [log] > demuxing in webworker\r\nlogger.js:37 [log] > main stream:IDLE->FRAG_LOADING\r\nmain.js:319 parsing level duration :29600us,count:1\r\nlogger.js:37 [log] > same live playlist, reload twice faster\r\nlogger.js:37 [log] > live playlist, reload in 2848 ms\r\nlogger.js:37 [log] > level 0 loaded [0,173],duration:991.2115099999971\r\nlogger.js:37 [log] > live playlist - outdated PTS, unknown sliding\r\nmain.js:319 parsing level duration :15550us,count:2\r\nlogger.js:37 [log] > Loaded  initSegment of [0 ,173],level 0\r\nlogger.js:37 [log] > main stream:FRAG_LOADING->IDLE\r\nlogger.js:37 [log] > live playlist, switching playlist, unknown, load middle frag : 87\r\nlogger.js:37 [log] > Loading 87 of [0 ,173],level 0, currentTime:973.212,bufferEnd:973.212\r\nlogger.js:37 [log] > main stream:IDLE->FRAG_LOADING\r\nfavicon.ico:1 GET http://streambox.fr/favicon.ico 404 (Not Found)\r\nlogger.js:37 [log] > Loaded  87 of [0 ,173],level 0\r\nlogger.js:37 [log] > main stream:FRAG_LOADING->PARSING\r\nlogger.js:37 [log] > Parsing 87 of [0 ,173],level 0, cc 14\r\nlogger.js:37 [log] > main:discontinuity detected\r\nlogger.js:37 [log] > main:switch detected\r\nblob:http://streambo…41-cf53953e644e:520 [log] > MP4Demuxer:video:avc1 found\r\nblob:http://streambo…41-cf53953e644e:520 [log] > MP4Demuxer:audio:mp4a found\r\nlogger.js:37 [log] > creating sourceBuffer(video/mp4;codecs=mp4a.40.5,avc1.42e01e)\r\nlogger.js:37 [log] > main track:audiovideo,container:video/mp4,codecs[level/parsed]=[undefined/mp4a.40.5,avc1.42e01e]\r\nlogger.js:37 [log] > InitPTS for cc: 14 found from video track: 4.1666748984425794e-7\r\nlogger.js:37 [log] > Parsed audiovideo,PTS:[483.204,489.043],DTS:[483.204/489.043],nb:1,dropped:0\r\nlogger.js:37 [log] > main stream:PARSING->PARSED\r\nlogger.js:37 [log] > main buffered : [483.204,489.043]\r\nlogger.js:37 [log] > latency/loading/parsing/append/kbps:54/2705/66/35/9234\r\nlogger.js:37 [log] > main stream:PARSED->IDLE\r\nlogger.js:37 [log] > Loading 88 of [0 ,173],level 0, currentTime:489.043,bufferEnd:489.043\r\nlogger.js:37 [log] > main stream:IDLE->FRAG_LOADING\r\nlogger.js:37 [log] > target start position not buffered, seek to buffered.start(0) 973.2115099999971 from current time0 \r\nlogger.js:37 [log] > Updating Media Source duration to 991.212\r\nlogger.js:37 [log] > media seeking to 489.043\r\nlogger.js:37 [log] > seeking outside of buffer but within currently loaded fragment range\r\nlogger.js:37 [log] > same live playlist, reload twice faster\r\nlogger.js:37 [log] > live playlist, reload in 2848 ms\r\nlogger.js:37 [log] > level 0 loaded [0,173],duration:991.2115099999971\r\nlogger.js:37 [log] > live playlist sliding:0.000\r\nmain.js:319 parsing level duration :10900us,count:3\r\nlogger.js:37 [log] > live playlist, reload in 5653 ms\r\nlogger.js:37 [log] > level 0 loaded [0,174],duration:997.0506769999971\r\nlogger.js:37 [log] > live playlist sliding:0.000\r\nlogger.js:37 [log] > Updating Media Source duration to 997.051\r\nmain.js:319 parsing level duration :8500us,count:4\r\nlogger.js:37 [log] > Loaded  88 of [0 ,174],level 0\r\nlogger.js:37 [log] > main stream:FRAG_LOADING->PARSING\r\nlogger.js:37 [log] > Parsing 88 of [0 ,174],level 0, cc 14\r\nlogger.js:37 [log] > Parsed audiovideo,PTS:[489.043,494.882],DTS:[489.043/494.882],nb:1,dropped:0\r\nlogger.js:37 [log] > main stream:PARSING->PARSED\r\nlogger.js:37 [log] > main buffered : [483.204,494.882]\r\nlogger.js:37 [log] > latency/loading/parsing/append/kbps:55/2714/19/19/9407\r\nlogger.js:37 [log] > main stream:PARSED->IDLE\r\nlogger.js:37 [log] > Loading 89 of [0 ,174],level 0, currentTime:489.043,bufferEnd:494.882\r\nlogger.js:37 [log] > main stream:IDLE->FRAG_LOADING\r\nlogger.js:37 [log] > same live playlist, reload twice faster\r\nlogger.js:37 [log] > live playlist, reload in 2849 ms\r\nlogger.js:37 [log] > level 0 loaded [0,174],duration:997.0506769999971\r\nlogger.js:37 [log] > live playlist sliding:0.000\r\nmain.js:319 parsing level duration :6960us,count:5\r\nlogger.js:37 [log] > media seeked to 489.043\r\nlogger.js:37 [log] > Loaded  89 of [0 ,174],level 0\r\nlogger.js:37 [log] > main stream:FRAG_LOADING->PARSING\r\nlogger.js:37 [log] > Parsing 89 of [0 ,174],level 0, cc 14\r\nlogger.js:37 [log] > Parsed audiovideo,PTS:[494.882,500.721],DTS:[494.882/500.721],nb:1,dropped:0\r\nlogger.js:37 [log] > main stream:PARSING->PARSED\r\nlogger.js:37 [log] > main buffered : [483.204,500.721]\r\nlogger.js:37 [log] > latency/loading/parsing/append/kbps:43/2923/11/19/8814\r\nlogger.js:37 [log] > main stream:PARSED->IDLE\r\nlogger.js:37 [log] > Loading 90 of [0 ,174],level 0, currentTime:489.043,bufferEnd:500.721\r\nlogger.js:37 [log] > main stream:IDLE->FRAG_LOADING\r\nlogger.js:37 [log] > same live playlist, reload twice faster\r\nlogger.js:37 [log] > live playlist, reload in 2849 ms\r\nlogger.js:37 [log] > level 0 loaded [0,174],duration:997.0506769999971\r\nlogger.js:37 [log] > live playlist sliding:0.000\r\nmain.js:319 parsing level duration :5933us,count:6\r\n```\r\n"}}
{"actor":{"display_login":"sesse"}}