Video duration listing

Some questions about PAI :

  • There is no meta about video duration ? Need to create it manually ?
  • We need to have total view duration and average view duration for each vidéos. If we understand, we need to : get all vidéos, for each vidéos, get all sessions, for all sessions get all event and then calculate durations. Seems to be very heavy for a table with 15 vidéos and 850 users views. There is another method ?


I agree - adding video duration would be a great feature to the API. Additionally - adding a time played to the session data would also be useful, and I will add these 2 features to the roadmap.

The session does list the start & end of the session - which could be used as a proxy for amount of video watched, but it is not exact.


Indeed the session provides a started at and ended at timestamp, but if a user pause the video during a long time the session will be longer than the view time.

I found a quick way to guess duration view but the events have sometimes an awckward order, so it is difficult to find a real view time. A timer incremented on JS side and added to the session parameter would be easier to implement than guessing the view time based on the events.

As a workaround we will add metadata to the video to set the duration.


it is window based (not tab based!)

I like having a lot of tabs open, so this session has never ended…

Our devs suggest reloading the embed code with JS to force a new session,