Hi all,
I'm having a problem with image caching with the image canvas component. I have a poster screen which is populated with images. When an image is clicked, I would like to display the image full screen. The image canvas component has been working for this, except that it does not re-load the image. You see, all my images have the same URL. Just before displaying the image, I make a call to my server indicating which image I would like to see, and it moves it to the URL. It appears that this is causing the Roku's internal caching system to always display the first image that was requested in this manner.
I have verified this behaviour by selecting an image from the poster screen, then visiting the URL in a browser, and comparing the image to the one displayed on Roku. The browser
always has the correct image. The roku always has the first image.
Here is my display code (note: imageUrl will always be the same string, but when accessed, should return a different image):
m.Data.Photo = photo
m.Data.Screen.SetLayer(0, {Color:"#FF000000", CompositionMode:"Source"})
m.Data.Screen.SetLayer(1, [{
url : imageUrl,
TargetRect : {
x : int(displayX),
y : int(displayY),
w : int(displayWidth),
h : int(displayHeight)
}
}])
This behaviour also persists across multiple image canvas components. If I create one, set its URL, then let it fall out of scope, and do the same with a new canvas, the image initially requested by the first canvas will be displayed.
Does anyone have any thoughts on what my options are? Ideally, I would like to be able to clear the internal image cache.
Cheers