Strobe Media Playback: Wrapped
Strobe Media Playback (SMP) has quickly become my Flash media player of choice.
Built by Adobe - using the Open Source Media Framework (OSMF) - it's simple to use, yet powerful; and thanks to being open source, the project is available for all to download, modify, and re-build at will. Which, as it turns out, is rather handy.
For a recent project I needed to -quickly- implement a Flash video player that supported various streaming protocols, and would play nicely when loaded/controlled by some other Flash content. For me, SMP was the obvious choice.
The standard player supports being loaded by another SWF - passing any flashvars from the loading SWF on to the player - but for this project I needed more control over the configuration, positioning, size, and full-screen behaviour. With a few small changes to StrobeMediaPlayback.as, and a new wrapper class to make loading and configuring the player from Flash nice and simple, I had what I needed.
When modifying the player, my aim was to retain all the original functionality and behaviour when embedded into HTML - so the same player can be used everywhere, as you should see at above... However, *caveat alert* I can't guarantee that, so if you end up deploying this somewhere important be sure to test it works as expected beforehand.
Changes to the player were made in the StrobeMediaPlayback document class:
- Added an option to stop the automatic initialize() call when the player is added to the stage - to allow initialising the player with custom sets of parameters, not necessarily from the loaderInfo parameters.
- Added optional width/height parameters to the initialize function, where passing 0,0 causes the player to fit the full size of the stage.
- Added a resize function that can be called any time after initialisation.
Get the wrapper code and tweaked StrobeMediaPlayback here. There's a little read-me in there to help you get started working with the wrapper and/or rebuilding the player, and the changes are documented in comments at the top of the StrobeMediaPlayback class.
The wrapper and player modifications are built on version 1.5 of StrobeMediaPlayback - you can view/download the various SMP distributions on sourceforge.













