[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Mon Aug 31 2020

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

1const analyticsConfig = {
2 key: '<YOUR ANALYITICS KEY>',
3 videoId: 'VIDEO_ID',
4 isLive: true
5};
6
7const player = new Hls();
8const analytics = new bitmovin.analytics.adapters.HlsAdapter(config, player);
9

Give us feedback