How to get the current latency value from the player?

I know there is a function to get the current latency player.lowlatency.getLatency().
However, it seems it only works for CMAF contents.

Is there any way to get current latency for content that doesn’t support low latency?


hello Evren,
Our player.lowlatency.getLatency() only works with CMAF content yes. May I ask what is your use case for getting Latency on no LL streams?
Is it DASH or HLS? and what is the encoding of the segments?


Hi Thomas,

Thanks for your response.

We would like to see the current latency of DASH or HLS content displayed on the web in order to analyze it. We can get this on other platforms. For example, Exoplayer for Android provides this to us.

Is there any way to get the current latency?

hello Evren
thanks for the information. I have some follow up questions.

  • Could you please let us know which Exoplayer function allows you to get the Latency and the result you obtain?
  • Is it right to say that what you are trying to measure is the distance to Live Edge? If the response is yes, then you can obtain this by doing the following on Web SDK:
let maxBuffer = Math.max(
  player.buffer.getLevel('forwardduration', 'video').targetLevel,
  player.buffer.getLevel('forwardduration', 'audio').targetLevel
let liveEdgeDistance = -player.getTimeShift() + maxBuffer


This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.