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: 
MediaDev
Visitor

How to load image from file system in scene graph component

Hi,
Is it possible to load an image from filesystem (which was retrieved and written to tmp:/somelocation) using AsyncGetToFile() to be shown in a poster component?
Or is it limited to URIs only?Currently it appears that the posterURLs that we specify gets reloaded when we navigate away from the scene and come back.
How can this be cached and used?

Regards
Media dev
0 Kudos
4 REPLIES 4
Tyler_Smith
Streaming Star

Re: How to load image from file system in scene graph compon

You can do the following:

<Poster uri="pkg:/path/to/image.jpg" />
Tyler Smith
0 Kudos
MediaDev
Visitor

Re: How to load image from file system in scene graph compon

Thanks Tyler for the response. But i want to address a scenario where, the image becomes available through a URL fetch (Eg:AsyncGettoFile) and they are saved in temp.
It's not a part of the channel package. From a task node, am able to save the image to temp folder and verify it exists.
But when i use this location URL for a poster, the poster is blank. In SDK 1.0 it was possible. It looks like, file system access isn't possible from component?
I could see from docs that roFileSystem isn't available from component.

Regards
Media Dev
0 Kudos
RokuJoel
Binge Watcher

Re: How to load image from file system in scene graph compon

Use tmp:/ instead of pkg:/ if you are downloading to tmp:/

- Joel
0 Kudos
MediaDev
Visitor

Re: How to load image from file system in scene graph compon

Joel,
Thanks for the response. I used the file system path only (tmp:/...) after downloading it to tmp. I also verified that the file is saved. However if this path is set as URI for a poster, the poster is blank.If i use an image from pkg it loads correctly. If i observe the loadstatus change of the poster it goes to failed state. This is something i see in scene graph components. in SDK 1.0 this was possible.

Regards
Media Dev
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.