joe_haase
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
08:02 AM
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.
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 6
hoffmcs
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
08:54 AM
Re: Image reload on Videoplayer example
The Roku caches images so if the url is not changing, it will show the same image. Check out this post about generating a unique url to force the reload of the image.
viewtopic.php?f=34&t=32159&p=202936#p202936
viewtopic.php?f=34&t=32159&p=202936#p202936
joe_haase
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
09:02 AM
Re: Image reload on Videoplayer example
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???
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???
hoffmcs
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
09:14 AM
Re: Image reload on Videoplayer example
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
joe_haase
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
09:37 AM
Re: Image reload on Videoplayer example
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'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..
dynamitemedia
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
10:49 AM
Re: Image reload on Videoplayer example
"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.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
joe_haase
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2010
11:44 AM
Re: Image reload on Videoplayer example
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!
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!