Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

pre-downloading thumbnail images

I've been working along with the sample channel project.  The channel I'm building downloads a feed from vimeo which has a set of videos each having title, description, thumbnail image, url.

While the feed is downloaded, parsed, and the content items are built, it shows a "Loading..." message.  Then when done it shows the scene with the content.

What I've noticed is that sometimes it shows the list of tiles and it can take a couple seconds or so to load in the images.  Although the feed is downloaded and used to populate the content, the thumbnail images themselves are just URLs which then get downloaded separately (outside the content loading task) for display and this happens after its already displaying the items.

Was thinking about a couple possible approaches.

1) As part of the content loading task, also download the individual thumbnail images using the URLs in the feed, store them in the cache file system available to the channel and replace the URLs with the local file path in cache.  This would mean the loading task wouldn't finish until all the thumbnails were downloaded, but then the content would be referencing them locally so no delay in showing them.

2) Was hoping there was a simpler way to ask Roku to download and cache the thumbnail URLs so that when it goes to display the content it already has them and can show them immediately.

Is there a way to do #2?  Can I ask Roku to download and pre-cache an image at a URL so that when content specifies that URL as a thumbnail it already has it in the cache used by the renderer?

 

0 Kudos
1 Reply
Level 7

Re: pre-downloading thumbnail images

I see it has been working that way when I started playing with Roku some years ago. I just use a Poster and associate uri to it.

0 Kudos