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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Channel Surfer

Roku Brightscript How to refresh image with Poster object

I have 1 http address to load images that change with timestamp.

For example

Can I use a Poster object to do this real-time refresh of the image content? If the poster doesn't support it, can I use another object? Please give me some help.

0 Kudos
Roku Guru

Re: Roku Brightscript How to refresh image with Poster object

you need to create one Task Node(control nodes) and Put your Poster(Image) code inside the Task node. and you need to use the timer(control nodes)("fire" events) for handling the Task node For calling timewise.

0 Kudos
Channel Surfer

Re: Roku Brightscript How to refresh image with Poster object

I still can't implement the Task node in the way you instructed.
With the Poster Component object, I see it has a uri property. I still don't understand why using Task node in this case.

I have tried with Timer but when loading the image displayed on the device, it appears black flashing when changing the uri of the Poster.
Here is the source code I am trying to test.

<?xml version="1.0" encoding="utf-8" ?>
<component name="posterScene" extends="Scene" >

<script type="text/brightscript" >

<!-- m.poster.ObserveField("loadStatus", "changetext") -->


sub init()

m.timer ="exampleTimer")
m.timer.ObserveField("fire", "changetexta")
m.timer.control = "start"

m.mirrorUrl = ""

m.poster ="channelbugPoster")
end sub

sub changetexta()
time = CreateObject("roDateTime")
second = time.AsSeconds()
milisecond = time.GetMilliseconds()
timestampString = second.ToStr() + milisecond.ToStr()
m.poster.uri = mirrorUrl

end sub


translation="[0,0]" />

id = "exampleTimer"
repeat = "true"
duration = "0.03" />