Hls.js: Get Realtime Content in Live TV/DVR when pause then resumed.

Created on 30 Jun 2016  路  4Comments  路  Source: video-dev/hls.js

Environment
  • [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [x] The issue observed is not already reported by searching on Github under https://github.com/dailymotion/hls.js/issues
  • [x] There are no network errors such as 404s in the browser console when trying to play the stream
  • [x] The issue occurs in the latest reference client on http://dailymotion.github.io/hls.js/demo and not just on my page
  • Link to playable M3U8 file: "http://nasatv-lh.akamaihd.net/i/NASA_101@319270/master.m3u8"
  • Hls.js version: 0.6.1
  • Browser name/version: Google Chrome v51
  • OS name/version: Windows 8

    Expected behavior

    What you expected to happen
    1> Player starts to play Live TV and we apply pause, then we resume player say about after 5 mins.

    • We should see realtime live content
      2> We are ok to see Buffered Content in case of Live TV DVR, If present playing content still lies between total duration of realtime m3u8.
      Actual behavior

What actually happened
1> Player starts to play Live TV and we apply pause, then we resume player say about after 5 mins.
- We will see the older buffered content instead of real time content.
2> We are ok to see Buffered Content in case of Live TV DVR, If present playing content still lies between total duration of realtime m3u8.

Earlier Solution and Solutions we tried

We had similar problem with Manguihls, where we used to reload play url again to show realtime live tv content

  • But this will disturb manual quality selection, the player starts from Automatic Adaptive. User need to manually switch to desired quality again.

when resuming again we are doing
video.currentTime = video.duration;

  • But doing this we still see older content for few seconds, and player buffers for longer time. Which is latency to fetch fresh m3u8 and chunks.
Desired Solution

We like to know a way to show Live tv content with Realtime video whenever we resume without reloading url again, also maintaining same manual quality , cc and others.

Question Wontfix

All 4 comments

hi @bharathsn0812
I think the actualy behavior you said above is right flow of hls: your video should resume exactly time where it's paused before

and in hls config has some variable to solve your problem: liveMaxLatencyDurationCount or liveMaxLatencyDuration. You should take a look at this for more infomation

liveMaxLatencyDurationCount

(default: Infinity)

maximum delay allowed from edge of live, expressed in multiple of EXT-X-TARGETDURATION. if set to 10, the player will seek back to liveSyncDurationCount whenever the next fragment to be loaded is older than N-10, N being the last fragment of the live playlist. If set, this value must be stricly superior to liveSyncDurationCount a value too close from liveSyncDurationCount is likely to cause playback stalls.

the other option to safely resume live without seeking too close to live edge is to do
video.currentTime = video.duration - 3*fragmentDuration;
fragmentDuration being retrieved from LEVEL_LOADED event , data.details.targetduration

Hi All,

I used video.currentTime = video.duration - 3*fragmentDuration;
and able to seek to real-time content live content in DVR or live stream.

But facing another issue with DVR
*The m3u8 contains 20mins of past data, under this condition video-player $('video')[0].duration returns 20mins.
*As time increments by 1min we can see $('video')[0].duration returns 21min, thought we have atmost of 20mins of content available in DVR. Which is wrong.
*If user seeks to content less than 1 min then player plays real-time content.
*As expected behavior we want player to play content less than 1 min relative to DVR content.
*Like to learn how to handle this condition.

*Can be reproduced this issue in "http://dailymotion.github.io/hls.js/demo/"

Thanks and Regards
BHARATH S N

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings