Actually, a posterscreen updates its content as soon as you update the content list, so all you need to do is check periodically for the availability of the live stream and then add the poster item to the poster list:
screen=createobject("roposterscreen")
screen.show()
test=[{shortdescriptionline1:"test"},{shortdescriptionline1:"west"},{shortdescriptionline1:"best"}]
screen.setcontentlist(test)
test.unshift({shortdescriptionline1:"vest"})
screen.setcontentlist(test)
so you could have your main loop:
timer=createobject("rotimespan")
while true
msg=wait(100,port)
if timer.totalseconds() > 60 then
posteritem=checkforlivestream()
if type(posteritem) = "roassociativearray" then
posterlist.unshift(posteritem)
screen.setcontentlist(posterlist)
else 'condition here is that there is no live stream available
if posterlist[0].livestream=true then 'here we check if the poster item for a live stream is in the current list so we can remove it from the list
posterlist.shift() 'remove poster item from the list
screen.setcontentlist(posterlist)
end if
end if
end if
timer.mark()
end if
and
function checkforlivestream() as object
.... code to check for livestream goes here
if livestream=true then
....code to build Associative Array for live stream goes here
posteritem=livestreamAA
posteritem.livestream=true 'add this to your poster item so that it is unique and easy to remove from posterlist
else
posteritem=-1
end if
return posteritem
end function
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!