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: 
Highlighted
Level 7

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
Highlighted
Level 8

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
Highlighted
Level 7

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
Highlighted
Roku Employee
Roku Employee

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
Highlighted
Level 7

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