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: 
jonmitten
Newbie

Record button events to database

Greetings,

I am unsure of the documentation that might contain the answers to this question, so I hope for a bit of initial guidance. I want to be able to record button presses along-side the time-code of a particular video, and the time of the event, or button-press.

I've been searching for terms like "record events", "record actions", "capture button press", but I'm not coming back with anything substantial.

I assume this is possible. Any insight is appreciated.
0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: Record button events to database

I think if you use the roVideoPlayer to do your playback, you should be able to record button presses from the message port for your roImageCanvas. You would create an roTimeSpan object and mark() at the start of play event, each time you get a button press, you could push the time and button number into an array variable.

- Joel
0 Kudos
jonmitten
Newbie

Re: Record button events to database

Is roImageCanvas a requirement of capturing button presses? Is the roVideoScreen incapable of handling it on its own, with its own roMessagePort?
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Record button events to database

"jonmitten" wrote:
Is roImageCanvas a requirement of capturing button presses? Is the roVideoScreen incapable of handling it on its own, with its own roMessagePort?


You might try experimenting with roVideoScreen's isPaused() and isResumed() events. They won't get you every single button press, but they will tell you when trick play begins and ends.
0 Kudos
destruk
Streaming Star

Re: Record button events to database

unless someone reboots the roku or presses home. 🙂
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.