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: 
viktoriia_dev
Channel Surfer

How to update the Poster image 30 times per second?

I need to update the Poster image 30 times per second.
Images are being served by the local server running on my iOS device.
I tried to use the Timer node to set the Poster uri.
The GET requests are sent to my server but images are not displayed in the Poster component.
If I increase the Timer duration to 0.5 seconds, images are displayed, but I need the Timer duration to be 0.03 seconds.


How can I accomplish this task?

0 Kudos
5 REPLIES 5
RokuBen
Community Moderator
Community Moderator

Re: How to update the Poster image 30 times per second?

I don't think you'll be able to do handle downloading an image and decoding it at that speed.  The image decoder is asynchronous on Roku OS, so when you provide the URL to the poster, it may take a frame or two for it to download and show in the poster.

0 Kudos
viktoriia_dev
Channel Surfer

Re: How to update the Poster image 30 times per second?

@RokuBen Thank you very much for your response.

What about downloading the image to the tmp:/ directory using the Task node and then providing URL to the poster? Is it possible?

0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: How to update the Poster image 30 times per second?

You can try this -- if you're loading a poster from /tmp, you can use the loadSync flag on Poster to have it decode immediately.

0 Kudos
viktoriia_dev
Channel Surfer

Re: How to update the Poster image 30 times per second?

@RokuBen Thank you. I will try.

Files in the /tmp must be deleted periodically. Or else the memory limit will be reached. Am I right?

0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: How to update the Poster image 30 times per second?

Yes, you're correct.  You should delete the images from tmp after they're no longer displayed.

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.