Always on top Webcam

I’m going to be doing a video critique of some source code later on today and the people being critiqued wanted to have my mug showing so they could see the looks of incredulity (I am kidding, of course).  So I did some looking around to find something that would keep the webcam software on top of the other windows.  Turns out there’s not much there or there was some kind pay mechanism and I really didn’t want to pay money to see myself in a webcam window that stayed above the other windows.

So, me being me, I decided to use our Flash Builder for PHP IDE and write what I needed.  It’s nice and simple.  Here’s the code.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
 import mx.collections.ArrayCollection;
 import mx.rpc.events.ResultEvent;
 protected var video : Video;
 protected var resolutions : Array = [{
 height: 480, width: 640
 height: 600, width: 800
 height: 768, width: 1024
 height: 720, width: 1280
 protected function initCamera() : void {
 if (video) {
 var camWidth : int = resolutions[cameraRes.value]["width"]; 
 var camHeight : int = resolutions[cameraRes.value]["height"]; 
 video = new Video(camWidth, camHeight);
 var camera : Camera = Camera.getCamera();
 camera.setMode(camWidth, camHeight, 30, true);
 width = camera.width;
 height = camera.height;
 <s:VideoDisplay x="0" y="0" width="100%" height="100%" id="videoDisplay" />
 <s:HSlider bottom="10" width="17%" change="initCamera()" horizontalCenter="-1" maximum="4"
 minimum="0" value="0" id="cameraRes"/>

Here’s the AIR file.  If you have AIR installed you can easily run it.  Here it is with a Windows installer.

10 thoughts on “Always on top Webcam”

  1. It is a great software. Can you provide an option to resize and reposition the window.- say about 2 inches in the left upper corner. This would be very useful to project the speaker’s live video during a live powerpoint presentaion.

        1. It looks like it was there as of last February, so I was hoping.

          I have my webcam pointed at the door (tall cubical, blind view of the entrance) and was looking for a small windowed app that shows what the cam sees and even better if it could stay on top.

          1. Yeah, I did some housecleaning as I moved all my stuff over to Docker and thought to myself “nobody’s going to want this.” I’ll check around and see if I still have it somewhere.

Leave a Reply to Bruce Cancel reply

Your email address will not be published. Required fields are marked *