{"action":"created","issue":{"url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/826","repository_url":"https://api.github.com/repos/videojs/videojs-contrib-hls","labels_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/826/labels{/name}","comments_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/826/comments","events_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/826/events","html_url":"https://github.com/videojs/videojs-contrib-hls/issues/826","id":172097753,"number":826,"title":"seeking within live streaming","user":{"login":"AlricLou","id":6871617,"avatar_url":"https://avatars.githubusercontent.com/u/6871617?v=3","gravatar_id":"","url":"https://api.github.com/users/AlricLou","html_url":"https://github.com/AlricLou","followers_url":"https://api.github.com/users/AlricLou/followers","following_url":"https://api.github.com/users/AlricLou/following{/other_user}","gists_url":"https://api.github.com/users/AlricLou/gists{/gist_id}","starred_url":"https://api.github.com/users/AlricLou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlricLou/subscriptions","organizations_url":"https://api.github.com/users/AlricLou/orgs","repos_url":"https://api.github.com/users/AlricLou/repos","events_url":"https://api.github.com/users/AlricLou/events{/privacy}","received_events_url":"https://api.github.com/users/AlricLou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-19T10:05:24Z","updated_at":"2016-10-20T19:46:56Z","closed_at":null,"body":"how can I seek my hls video while m3u8 file doesn't have #EXT-X-ENDLIST tag?"},"comment":{"url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/comments/255208699","html_url":"https://github.com/videojs/videojs-contrib-hls/issues/826#issuecomment-255208699","issue_url":"https://api.github.com/repos/videojs/videojs-contrib-hls/issues/826","id":255208699,"user":{"login":"adgoncal","id":10856791,"avatar_url":"https://avatars.githubusercontent.com/u/10856791?v=3","gravatar_id":"","url":"https://api.github.com/users/adgoncal","html_url":"https://github.com/adgoncal","followers_url":"https://api.github.com/users/adgoncal/followers","following_url":"https://api.github.com/users/adgoncal/following{/other_user}","gists_url":"https://api.github.com/users/adgoncal/gists{/gist_id}","starred_url":"https://api.github.com/users/adgoncal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adgoncal/subscriptions","organizations_url":"https://api.github.com/users/adgoncal/orgs","repos_url":"https://api.github.com/users/adgoncal/repos","events_url":"https://api.github.com/users/adgoncal/events{/privacy}","received_events_url":"https://api.github.com/users/adgoncal/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T19:46:56Z","updated_at":"2016-10-20T19:46:56Z","body":"I am currently trying to achieve this. So far, this is what I have:\r\n\r\n```javaScript\r\nvar lastDuration = Infinity;\r\nplayer.on('timeupdate', function() {\r\n  var duration = player.duration();\r\n  if(!isFinite(duration)) {\r\n    var start = player.seekable().start(0);\r\n    var end = player.seekable().end(0);\r\n    if(start !== end) {\r\n      // 5 seconds offset to prevent freeze when seeking all the way to left\r\n      duration = end - start - 5;\r\n      if(duration >= 0 && duration !== lastDuration) {\r\n        player.duration(duration);\r\n        lastDuration = duration;\r\n      } else if(isFinite(lastDuration)) {\r\n        player.duration(lastDuration);\r\n      }\r\n    }\r\n  }\r\n});\r\n```\r\n\r\nProblems I have found with this:\r\n\r\n- When a new segment is loaded, `player.duration()` is set to `Infinity` and there is a flicker on the `controlBar` because the `vjs-live` class is added and immediately afterwards it is removed due to the above code setting `duration` to a finite number."}}
{"actor":{"display_login":"adgoncal"}}