Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joetesta
Roku Guru

how to track pay-per-minute?

I saw some private channels offering pay-per-minute content and wondering how this is done. Does the roku app track how long the video player stays open? Or does the media server detect for how long streams are requested?
In the past I tried to generate reports showing how long users watched but wasn't able to get any kind of accurate measure, so I am really curious how they can do this with any accuracy.
tvmia,
Joe
aspiring
0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: how to track pay-per-minute?

You could use msg.isplaybackposition() to tell how many seconds into a video the player has gone.

-Joel
0 Kudos
destruk
Streaming Star

Re: how to track pay-per-minute?

The problem with that is if the user fast forwards, or rewinds to their favorite scene, it will misreport the time.
What you could do - increase the server traffic, set playback position notification to 1 second and every second (or another set minimum interval the roku would have to keep track of) have it send data to the server to indicate that second was actually played.
0 Kudos
destruk
Streaming Star

Re: how to track pay-per-minute?

Of course if you are doing 'pay-per-minute' entertainment, you might also consider a subroutine that tracks how long a single frame has been 'paused' and still visible on the screen - or how much time spent looking through the bif file images - perhaps at a half-price discount per minute with a 1 minute minimum in that mode....
0 Kudos
TheEndless
Channel Surfer

Re: how to track pay-per-minute?

"destruk" wrote:
The problem with that is if the user fast forwards, or rewinds to their favorite scene, it will misreport the time.
What you could do - increase the server traffic, set playback position notification to 1 second and every second (or another set minimum interval the roku would have to keep track of) have it send data to the server to indicate that second was actually played.

I'd suggest using an roTimespan to track the seconds played. Fast forwards and rewinds trigger the isPaused event, so you could capture the total seconds on pause, and Mark() the timespan on isResumed/isStreamStarted. That should give pretty accurate viewing times.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.