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: 
Deepaks3
Binge Watcher

timer inside video player during play mode parallelly with playing video

I have an issue with video player playing mode, i want to run timer with while loop inside my video player during video play mode and it should run parallelly with running video display in a UI.

i am really thankful if anyone will suggest any solution for this.

 

Thanks you

0 Kudos
1 REPLY 1
sanity-check
Roku Guru

Re: timer inside video player during play mode parallelly with playing video

If you want a literal while loop you'll need to do that in a non-UI thread, so you could use a Task node and start it running when you start video playback. It seems safe-ish to pass a reference to the video object to the task (or at least, that's how Mux works on Roku).

If you just need some bit of code to run on an interval you can use the "Timer" node.

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.