How does Analytics distinguish between VOD and live content?

The default behaviour of the Analytics collector is to retrieve the isLive flag from the player. Most of the time, this information will not be available directly after initializing the collector, so the first setup sample will send a default value of isLive: false.

If you know whether your content will be live or VOD, you can pass this via the Analytics configuration. The collector will fall back to the configured value instead of sending the default value of false then. Remark: As soon as the isLive flag is available from the player, the actual value will take precedence over the value in the configuration.

Example

const analyticsConfig = {
  key: '<YOUR ANALYITICS KEY>',
  videoId: 'VIDEO_ID',
  isLive: true
};
 
const player = new Hls();
const analytics = new bitmovin.analytics.adapters.HlsAdapter(config, player);