You can check if a stream being played is live or VOD by checking its duration. If the duration returns Infinity
, the stream would be live. Examples:
var isLive = player.duration === Infinity // true or false
boolean isLive = Double.isNaN(tpv.getPlayer().getDuration()); // true or false