-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlasHLS playback: player.getCurrentTime() is not consistent with events #1221
Comments
Hi, I have some suggestions to help solving this issue! Here is a list of similar issues: Hope this is useful! Cheers, PS: Liked my suggestions? Install me in your repository! Visit: getcinnamon.io. |
var playerElement = document.getElementById("player-wrapper");
Clappr.Log.setLevel(0)
window.player = new Clappr.Player({
source: '[A LIVE HLS URL]',
baseUrl: '/latest',
poster: 'http://clappr.io/poster.png',
mute: true,
autoPlay: true,
plugins: [Clappr.FlasHLS],
height: 360,
width: 640,
events: {
onTimeUpdate: console.log
}
});
player.attachTo(playerElement); |
I tried to reproduce this using one internal live stream and the results were consistent: With a DVR of 590s the logger shows consistently 590 ... 590 forever and when we start to watch a previous moment (DVR mode) the position was consistent with duration too. What values were you expecting to see and what values did you get? |
If you are watching the DVR, then yes. But if you are watching the LIVE it will return the duration. Check the PR. |
Let's say a playlist is 30 seconds long then the event will always trigger with the value 30 or 30.1 or 29.999 forever. This means that the duration is equal to the current time, is that what you mean? if yes, then this is not a bug, we chose to use this layout for live streaming but we're open to suggestions, what time would you want to see from live events? |
It is actually the opposite. The current time is equal to the duration. Which is pretty bad in my case since I need to save the exact time of the interaction with the player. |
Does it behave the same as the js hls playback? On 23 Nov 2016, at 17:31, Guilherme Medeiros <notifications@github.commailto:notifications@github.com> wrote: It is actually the opposite. The current time is equal to the duration. Which is pretty bad in my case since I need to save the exact time of the interaction with the player. — |
No. That's exactly how I found this issue. We have a |
💩 I was testing under |
When you mean time, do you mean it's a clock UTC time or time as time elapsed since the user start to watch the video? |
The elapsed time. |
Maybe you can't really notice if you have very short chunks. In our case we have 10 sec so things can really get out of sync since we need precision. |
@GuilhermeMedeiros sorry for the long delay, let's try to get back and see what we can do. First
|
Well, as you said, I expect the elapsed time, and not the total time, which is what the Flash playback returns at the moment. |
The only thing that really matters to me is to have consistency across playbacks, which is not the case at the moment and my PR fixes that. |
Thanks 👍 I got you @GuilhermeMedeiros @towerz and I will discuss this later. |
Browser: 54.0.2840.98 (64-bit)
OS: OS X El Capitan 10.11.6
Clappr Version: 0.2.64
Steps to reproduce:
plugins: [Clappr.FlasHLS]
Clappr.Log.setLevel(0)
player.getCurrentTime()
with the debug eventsThe text was updated successfully, but these errors were encountered: