Recently I took on a project with the U.S. State Department on behalf of Adobe Consulting, involving migrating their entire video platform from Windows Media to Adobe Media Server (AMF). As part of the project, I had to develop several video players using Apache Flex. With a lot of changes going on recently with Flex being open sourced, with new versions of the Flex SDK, and new versions of Open Source Media Framework (OSMF), which is now bundled with the Apache Flex SDK installer, I had a little bit of a rocky start building my OSMF players. There are a lot of examples out there that are outdated, don’t compile with remotely recent versions of the Flex SDK, etc. The whole point of OSMF is that it’s there to make it easy to implement a versatile video player in your applications, so I thought I would document some key starting points in this blog. Maybe it will save someone else just getting started with OSMF a little bit of time. 🙂 (Also, on a somewhat unrelated side note, my FlashBuilder IDE, along with a lot of my Creative Cloud software, just quit working in the middle of development. I’d been having a lot of issues with the CC installers – basically every time the Adobe Application Mangager was updated by Adobe I would have a new set of issues. A bunch of my twitter buddies suggested I get rid of FlashBuilder altogether and switch to IntelliJ IDEA instead. Turns out IntelliJ rocks, and not just for Flex development. I did finally resolve my Creative Cloud issues – but it involved uninstalling pretty much every Adobe application on my Mac.)
As of this writing, the current version of the Apache Flex SDK is 4.9.1 and the current version of OSMF is 2.0.
Documentation
There is a ton of documentation and example source code out there, starting with many links on the OSMF site itself. Unforunately a lot of that is outdated, including a huge set of example projects contributed by David Hassoun of Real Eyes media – feel free to look through the source code, but a lot of it may not compile out of the box. David himself was very responsive, but I just didn’t feel it was worth the time to bring any of the old projects up to date. So, what are some good starting points?
- OSMF Wiki Documentation Page on Sourcefourge
- The ActionScript® 3.0 Reference – type in “OSMF” in the search bar, there are several OSMF packages, such as org.osmf.net, org.osmf.elements, etc.
- Strobe Media Playback Demos – be sure to check out the Setup Page – it will quickly give you an idea of the huge number of configurable options out of the box.
- The OSMF source on SVN. Note that this download includes a TON of samples, including OSMF plugins such as Closed Captioning
- Step-by-step walkthroughs. These walkthroughs, entitled “Walk through 1_ The Simplest Player.pdf“, etc. – there are eleven of them – take you from the simplest of examples and step by step build up in complexity. They are a good way to quickly get up to speed on the various OSMF building blocks and options. Now, this is one of those times that, when you download the source code for the examples, they may not compile for you. However, the code is pretty basic, you can copy it it over into your own test project and get it to compile pretty easily. And reading through the walkthrough PDF files and comparing with the code is pretty educational for anyone new to OSMF.
One last note, not directly related to OSMF – I found it hugely helpful to mock up each video player as a wireframe using Balasmiq Mockups. Providing the client with these wireframes was easy and quick, and gave the client the opportunity to provide feedback and changes before any time was spent in development – an essential element of agile development Thanks again to @Balsamiq for creating an awesome product.
Anyway, that’s a start. I plan to post more soon.
Leave a Reply