{"id":2620,"date":"2011-01-24T00:01:47","date_gmt":"2011-01-24T08:01:47","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=2620"},"modified":"2018-01-05T12:30:03","modified_gmt":"2018-01-05T20:30:03","slug":"porchcam-updates","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=2620","title":{"rendered":"PorchCam Updates"},"content":{"rendered":"<p>I&#8217;ve re-worked the <a href=\"http:\/\/www.wambooli.com\/fun\/live\/\">Wambooli PorchCam<\/a> web page. Not sure if I like it yet, but I&#8217;ve fixed up a few things.<br \/>\n<!--more--><br \/>\nFirst, I had to remove the line that said, &#8220;The Porchcam is back up!&#8221; It&#8217;s been back up since 2008.<\/p>\n<p>Second, I adjusted the time from 10 minutes between images to 15 minutes. Why? Because:<\/p>\n<p>Third, I&#8217;ve added animation.<\/p>\n<p>The software I&#8217;m using, YAWCAM, retains previous images, numbering them in sequence. I had already used the five previous images on the PorchCam site, just as a way to catch the previous &#8220;action.&#8221; With the past 96 images now saved, that&#8217;s a full 24 hours. Animation was in order!<\/p>\n<p>I&#8217;m not exactly happy with the animation, but at least it works. Sorta.<\/p>\n<p>For animation I used JavaScript. I&#8217;m not happy with JavaScript anyway. That&#8217;s because the JavaScript documentation out there sucks big time.<\/p>\n<p>About 14 years ago, I bought the big <em>JavaScript<\/em> book from O&#8217;Reilly. It&#8217;s just awful. It doesn&#8217;t teach you anything and it&#8217;s a crappy reference. I just ordered the most recent release, so I&#8217;m hoping it&#8217;s better. In the meantime, I bought <em>JavaScript: The Missing Manual<\/em>.<\/p>\n<p><em>The Missing Manual<\/em> book is okay, but ends up talking more about JQuery, which wasn&#8217;t what I wanted.<\/p>\n<p class=\"sidebar\">JQuery is a collection of JavaScript routines that let you automate lots of things on a web page. Coupled with Cascading Style Sheets (CSS), you can do lots of really cool things on a web page by using JQuery.<\/p>\n<p>I&#8217;ll blather on about JavaScript books later.<\/p>\n<p>For the animation, I wrote a JavaScript program that swaps in all the previous 96 webcam images. It&#8217;s actually very simple code, though the operation of the timer code is kind of weird.<\/p>\n<p>Because the porchcam images can be up to 140K in size, the first time you view the images it takes a while for them to load. I tried to pre-cache the images, but it would still take about a minute to load the page. That&#8217;s unacceptable.<\/p>\n<p>Instead of waiting for a cache, the animation swaps in a new image every second. After cycling through those images, a new button appears that lets you view the porchcam animation a lot faster. That faster animation works because the images are cached.<\/p>\n<p>The problem with the method I chose is that for some reason it doesn&#8217;t cache all the images. The faster animation sometimes screws up. I&#8217;ll have to figure that one out. Or I&#8217;ll just have to discover another way to animate all the images. Feel free to offer any suggestions. Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve re-worked the Wambooli PorchCam web page. Not sure if I like it yet, but I&#8217;ve fixed up a few things.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[23],"class_list":["post-2620","post","type-post","status-publish","format-standard","hentry","category-main","tag-porchcam"],"_links":{"self":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2620"}],"version-history":[{"count":4,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2620\/revisions"}],"predecessor-version":[{"id":9367,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2620\/revisions\/9367"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}