Forum Discussion

joe_haase's avatar
joe_haase
Visitor
15 years ago

Image reload on Videoplayer example

So I'm a Noob here, but not totaly clueless with programming..

I am modifying my videoplayer example as a proof of concept piece, and have hit a wall.... under the categories, I have changed one to point to webcams around my neighborhood. We are using axis cameras, that have a direct path to return a jpg image. We have the image path loading up in the XML file, and shows up perfectly when the channel is loaded into the roku.

the problem I have is that I can't figgure out how to make the image refresh, or reload, every few seconds for example. It still shows the original pictures of night time when I loaded up the channel last night.

Any thoughts or tips would be greatly appreciated.

6 Replies

  • hoffmcs.... thanks for the response... that solves one of my problems!!!

    Atleast the image will reload everytime I launch the channel.... but there is any way of refreshing the images while the program is running?? Say every 2 minutes or so???
  • Most screens on the Roku use a simple while loop. If you are not processing screen messages (like remote buttons, except Home which will kill the app), a simple sleep will work. If you are, you can replace it with some counter or a wait function (eg. msg = wait(120000, screen.GetMessagePort()))

    while true
    'Load image

    sleep 120000 '2 minutes
    end while
  • I got it...I think.... 🙂

    I'm not used to writing code with no compiler or IDE.... I find myself lost trying to find one small sintax that keeps the whole thing from running..
  • "joe.haase" wrote:
    I got it...I think.... 🙂

    I'm not used to writing code with no compiler or IDE.... I find myself lost trying to find one small sintax that keeps the whole thing from running..



    I used to do it without the debugger!! yes the code is confusing at times and something simple will kill it quick! but the debugger will at least tell you where its at.
  • I just learned the debugger about 10 mins ago... and so far it's making life a little better. I still can't see where the images get loaded from the lower array (childleaf). I see where everything else comes in. I tried using the getunixtime(), and it posted a bunch of errors, so I swapped it out with a rnd(4500) to pull a random number.



    Now I just need to get my Wowza live stream and I'm in business... All I need is a proof of concept to get things going, then we will probably have a seasoned developer put everything together!