Open Veryyapeee opened 1 week ago
Hi @Veryyapeee ,
The player.seekable
property indeed returns the range, or list of ranges, in which the player is allowed to seek. For a live stream this is a sliding window that is updated on each manifest download. The manifest also indicates how much the player is recommended to stay before the actual live edge, to allow for buffering. So if you want to visualize whether the player is currently streaming on (or near) live, you'd need to compare the current time with the seekable end, but allow for some margin.
Returning to 'live' (the end of the seekable range) can be done by setting the currentTime to Infinite.
This would be the correct way to seek to the start of the window. On which platform did you experience the snap-back to live?
Hi @Veryyapeee ,
- The
player.seekable
property indeed returns the range, or list of ranges, in which the player is allowed to seek. For a live stream this is a sliding window that is updated on each manifest download. The manifest also indicates how much the player is recommended to stay before the actual live edge, to allow for buffering. So if you want to visualize whether the player is currently streaming on (or near) live, you'd need to compare the current time with the seekable end, but allow for some margin. Returning to 'live' (the end of the seekable range) can be done by setting the currentTime to Infinite.- This would be the correct way to seek to the start of the window. On which platform did you experience the snap-back to live?
Hi @Veryyapeee ,
- The
player.seekable
property indeed returns the range, or list of ranges, in which the player is allowed to seek. For a live stream this is a sliding window that is updated on each manifest download. The manifest also indicates how much the player is recommended to stay before the actual live edge, to allow for buffering. So if you want to visualize whether the player is currently streaming on (or near) live, you'd need to compare the current time with the seekable end, but allow for some margin. Returning to 'live' (the end of the seekable range) can be done by setting the currentTime to Infinite.- This would be the correct way to seek to the start of the window. On which platform did you experience the snap-back to live?
Here is how it's look like
So when I'm pressing the "Start over" button, I'm setting player's current time to player.seekable[0].start
And sometimes as you can see, player is getting stack for a second and is going back to previous position by itself, and sometimes seek is working correctly
@Veryyapeee could you try if seeking to the start of the seekable range + a small margin (few 100 msec) works better?
@Veryyapeee could you try if seeking to the start of the seekable range + a small margin (few 100 msec) works better?
I've tried, I've added few seconds margin, then it's working
Seems like small margin can't do the trick
@Veryyapeee it works when you seek before the seekable range updates. If the manifest updates before seeking, current time could fall outside the window. In that case it should clamp to the range, which apparently it doesn't. We'll look into this issue. Did you also reach out to our service desk? It might be good to log a ticket there as well, so we have the right context.
Hi, I have a couple questions
I'm using the example live stream url:
https://livesim.dashif.org/livesim/chunkdur_1/ato_7/testpic4_8s/Manifest.mpd
And I'd like to ask:
So comparing the player.currentTime from TimeUpdateEvent with .seekable[0].end but it seems not reliable
Sometimes the .end property is higher than currentTime
When I'm seeking to player.seekable[0].start sometimes it's working like a charm, and sometimes player is getting stuck (like like we missed the window by couple of ms) and it's getting back to the live edge