I've been reading some topics related to this and just want to know that i've understood correctly and the information is not outdated:
I want to log the total time a user has been listening to a track. There is an elapsedtime variable, but this also contains the time a song has been paused. So, if i want to accurately log the total playback time, i have to subtract the pauses manually. There is no better way to do this, right?
If my understanding is correct, and i need to implement a custom way of recording the actual playback time, what would be the best way to do this? When i log it in the database, i want to log it with the stop event instead of later calculating it with a database query. This means i need to store it in a session; my question: is there a unique session per stream? or is there a session per user? or is there a better way to approach this?