Forum

How to collect duration time of each client

rainbow 2020-12-15 01:56:46 UTC in Nimble Streamer

I'm using PPV to control the playback of stream. I want to collect the data about how long one client watch a stream.
I can get client ID from PPV request, and get the sum duration by counting the number of PPV requests, but apparently it's not accurate.
I notice that there is a field "sessionid" in PPV request, does it means one distinct client connection? Can I use it to get the accurate watch time of a client ? Or, is there some other ways can do it

Alex Pokotilo 2020-12-15 02:43:15 UTC 

Hi,
you are right - you should use sessionid and sum all durations from PPV for given sessionid to get session time of particular session. You should not count number of PPV requests for sure. You should use "delta" field and current session duration is always "SessionDuration"=Sum(delta) for given "sessionid"

rainbow 2020-12-15 03:10:57 UTC 

Thank you so much, that's very informative.

Post a reply


Post a new question

Categories:

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.