Popup Video Approved!


It took awhile, but we finally got all the bugs worked out and made this block generic enough for the concrete5 marketplace.You can download and purchase the block here:


It turned out that there was a lot more to getting this block to work than it looked like from the beginning.  The main thing was trying to figure out how to handle closing the windows.  Due to the way that the overlay worked, it was just hiding the pop-up div, and the video would keep playing.  Not good.

We were able to fix this by making a tools file that would output the correct HTML code for each popup, and calling it with a little json on the open/close to load in the Vimeo and Youtube video types. 

But it didn't work at all with Flowplayer. 

I'm not sure exactly why, but we had to keep only one Flowplayer instance on the page at the time, then manually specify the path to a new video file and tell the player to play.  Robert (my boss at Hutman) figured out how to do this for the Welcyon site that we had just done, but in that instance we knew for a fact exactly the size that all the videos were going to be.  This meant it worked, but we couldn't sell it in the marketplace, because you'd be able to set the pop-up size for Youtube and Vimeo but not for Flowplayer.

It actually took me about 6 hours to figure out all of the javascript to get Flowplayer working with callbacks from click events to resize the window and still play the videos correctly.  It was kind of a nightmare - nothing was 'wrong' with the code I was writing, but it would work in one browser and then not another, or tweaking little things would make parts of it not work.  Eventually I got everything executing in exactly the right sequence to work in all of our target browsers. 

All in all I am really happy with how the block turned out.  Of the stuff I've programmed I think it has the most potential for being sold on a pretty big basis.  There are tons of sites that could use this. 

It's kind of a first test for us as a company at Hutman, too - if it works out I think we'll be looking more at what we develop in terms of 'how can we resell this after we are done with the particular site we're working on' - there are a lot of things that go into making custom sites that can be made a little more generic and re-sold. 

Personally, I'd almost like to dedicate as much time to developing stuff in a generic format as opposed to developing it in a specific format.  It just feels nicer to me, the code I write is stronger, I am more proud of the work that I do.  When you are working on a site for a client as a subcontractor you're just working to get things done as quickly as possible and match the IA documents or PSD files or whatever is supplied - it's not necessarily going to mean that you can sit down and go through every use case and option and make sure it's all PERFECT.  When I'm developing for the marketplace, the impetus is to work more towards perfection - because now instead of a bug or oversight affecting one site out of many, you have many many customers who are all going to have the same bug.  It's a lot riskier, and what you write has to be of a higher caliber otherwise you're going to have to do a lot of support requests.

The trade off, of course is that instead of having just one site that you create with one pay-off at the end of development, you now have an ongoing revenue stream that keeps going.  The better your add-on is and the more people it could potentially appeal to, the better that you will do.  I already make a couple of hundred dollars a month off of sales of the few blocks I have developed in the past, and I plan on doing a few more on the side when I can find time.  If I can get to the point that I'm making a few thousand instead of a few hundred, maybe I won't even have to work at all - wouldn't that be nice?  Just picking and choosing which projects seem interesting and worth the effort, taking time off when I feel like things are getting too stressful.  It would be good, I think it's something I should really be focusing on. 

Instead I've been volunteering my extra time on a couple of pro-bono bicycling related websites that are going to be fun, but probably won't pay all that well.  What is wrong with me?

At any rate, it's in the marketplace now, it should be really interesting to see how well it sells and how much support there actually is.  It will also be interesting to see what this means to how we develop code at Hutman.