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

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
2 REPLIES 2
coldrain
Binge Watcher

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
Nerdtron
Binge Watcher

Re: pre-downloading thumbnail images

Are you saying using a poster avoids the deferred downloading?  Not sure I follow what you mean.

0 Kudos