Karen and I watched The Apprentice last night when we went to bed. We don't have a TV in the bedroom though and we didn't watch it at its 9pm slot as I was busy getting the new office ready for the plasterer, who's here today. Instead we watched it at a time that suited us in a place that suited us (we've gotten in to the naughty habit of watching DVDs in bed instead of reading a book). All this thanks to the BBC's iPlayer.
All the TV stations here in the UK seem to getting in to streaming their programmes once they've aired and letting you "catch up" for a week or so after. It seems like the internet has gone streaming mad. Some say it will choke it to death.
Whether or not all this streaming media is a bad thing for the web, it's obviously what the people want. So where does that leave us Domino developers when we're asked to "add YouTube" to a Domino-based sites?
This is something I was asked to do recently. A customer wanted to embed movies in the news items on their site. Although I knew this would be possible and was sure there be an off-the-shelf Flash player available I didn't realise just how easy it would be. Adding embedded movies to Domino pages is so easy.
The first thing you need is a player. The best I could find was the JW FLV Media Player. The best part about it being that it's free (buy a licence and the right-click "about" menu goes).
Once downloaded all you need to do is import the SWF for the player in to your database's design and follow the site's instructions on how to set it up. Once you have it on your form you just need to tell it what file to play. The bit I was initially unsure of was whether it would play a file that was attached to the document itself. No reason why it shouldn't, but I just wasn't sure it would. So, I configured it to use the first attachment it found on the document and, hey presto, it worked.
You can see the player playing a file attached to a Notes document in this demo. View the source to see how it's configured. So easy and so, so cheap.
The second thing you need is a way to convert movies to the FLV format, which has a 99% chance of being playable by the user's browser.
To do this I bought a copy of On2's Flix Standard for $39. The interface is a bit clunky but it does the trick and converts all the common video formats to FLV.
And that's it! The simplest way to embed movies in your Domino applications. It couldn't get any simpler than that.
The third thing you need to do is give the site's authors a way to upload and place the movies within the document's "body" field at a point of their choosing. This is the bit I'll be on with next and I'll let you know how I get on. I'll probably be writing a plugin for the TinyMCE editor if one doesn't exist already.
Note: I used the term streaming liberally in the above post, although I'm not sure it is streaming in the truly technical sense. You get what I mean though, right...