Version: 2.67.0

FAQ | How to know whether a live stream is playing?

The question is related to knowing if a stream is live or on-demand.

The below **code snippet determines whether a stream is live.**


var isLive = (player.duration === Infinity); // true or false

Android SDK

boolean isLive = Double.isNaN(tpv.getPlayer().getDuration()); // true or false