PDA

View Full Version : Total Played TIme Proposal



jbinkley60
04-27-2017, 04:52 AM
In the past we've discussed the various variable Mezzmo tracks to determine whether a file has been played. It has a play counter which is incremented once the play position in the file exceeds the % setting in Mezzmo. There is also a bookmark which tracks the position of when we stop playing a file which can then be shared wit things like the Kodi plug-in and such. We also have the last played variable which tracks when the play counter is incremented.

However, even with these we still have issues where if we preview a file (either manually or by a client which automatically supports a preview mode. FYI, hoping to see this in the Kodi plug-in soon) that messes with some of these variables in a less than desirable way. I'd like to consider something called a total play time variable which is set when Mezzmo starts streaming a file, it counts the amount of time a file is streamed (so it stops counting when a file is paused or stopped) and then when the file is stopped it writes the total time to the Mezzmo Total Played Time variable in the database for that file. When the Total Played Time / the total file time exceeds time % setting in Mezzmo the play counter variable is incremented by 1. This way you could preview a file and not increment any of the play counters. If you played a file for two short increments then Mezzmo would just increment the Total Played Time variable to be the sum of the two and keep track until you hit the instance above where Total Played Time / the total file time exceeds time % setting in Mezzmo.

The only question then is when to zero the Total Played Time variable to zero and start over. I'd suggest that once the play counter variable increments by 1 and the current play position is between the % played point and the end of the file then we stop incrementing the Total Played Time or set the value to equal the file length. Then if the file length is max and the play position goes back to the beginning then we set the Total Play Time to zero to begin the next play count counting. The only potential downside I see here is if multiple clients are laying the same file but that condition exists today too with regards to incrementing the play counter and last time played.

I hope this makes sense.

Peter
04-27-2017, 09:44 AM
Hi Jeff,
this is actually close to how the play count increment works, Mezzmo server tracks how much of the file has been streamed to the device until the % value set to increment the playcount is reached. The amount of the file streamed is converted to a time value and this is compared to the duration to calculate a percentage. The problem is that some players buffer the file content so even if the user pauses the file the device may keep reading ahead and possibly reach the playcount % so if the user stops the file instead of resuming the playcount will indicate the file has been viewed. To resolve issues with previews you can set the percentage value in Options under Streaming to a higher value (the default is 20), so setting it to 80 will ensure previews do not trigger the playcount.

jbinkley60
04-27-2017, 10:54 AM
Peter,

I thought the play count increment works off of position in the file vs. the total amount of time I actually play the file. For instance if I fast forward or skip past the 20% in a short time doesn't that increment the play counter even though I actually played the file less than 20% of real time ? I'll take a look at changing the % setting.

Peter
04-27-2017, 11:24 AM
The play count works off how much of the file has been streamed to the device and not from where in the file, so you could set the % to 80 then stream the first half of the video and rewind to the start then stream the first half again and it will trigger the playcount because 80% of the total file has been streamed.