Quick Note on OSMF 0.7
I've started work on the next installment of my training on the Adobe Open Source Media Framework (OSMF) (following my course on building a progressive video player with OSMF, published last month). And in the roughly 6 weeks since I built the code for the last course (using OSMF 0.5), we've seen two revs of the OSMF codebase, which is now in rev 7.
The framework is definitely more solid now, but, since it's still 'beta', they continue to shift things under the hood. One of the more significant that will impact almost anyone who's worked with previous versions is the renaming of the source property on the MediaPlayer to element. This is actually the 2nd time they've renamed this property; at first it was named media).
So, when you want to play a video, for example, instead of writing this (which would work in 0.5):
var urlResource = new URLResource ( new URL ( "my.flv" ) ) ; player.source = new VideoElement( new NetLoader(), urlResource );
You'd write this (which works in 0.7):
var urlResource = new URLResource ( new URL ( "my.flv" ) ) ; player.element = new VideoElement( new NetLoader(), urlResource );
Also, I think it's noteworthy that, as of the current version, when building OSMF to stream with FMS, OSMF will strip the .flv extension, but will not strip the .mp4 extension. So, in 0.7, to stream an FLV, you would write:
var urlResource = new URLResource ( new URL ( "rtmp://almer.rtmphost.com/osmfplayer/flv:kennedy" ) ) ; player.element = new VideoElement( new NetLoader(), urlResource );
And to stream an MP4, you would write:
var urlResource = new URLResource ( new URL ( "rtmp://almer.rtmphost.com/osmfplayer/mp4:sample5.mp4" ) ) ; player.element = new VideoElement( new NetLoader(), urlResource );
Hope this post saved you some pain.
Share and enjoy!
-r
UPDATE: Sorry, I forgot to mention one top-line item so obvious that I guess that's why I skipped it. All the packages now begin with org.osmf instead of org.openvideoplayer. So if you update your OSMF MediaFramework.swc and none of your existing OSMF projects will compile, that -- along with the renaming of source, described above -- are the two most likely culprits.



3 comments
[...] UPDATE 11/19/09: Forgot to supply the link I promised to R Blank’s free online seminar on OSMF (which was a great help to me in preparing my examples; thanks, R!) Here is a link, along with some updates to the code he demonstrated: http://www.rblank.com/2009/11/10/quick-note-on-osmf-0-7/ [...]
[WORDPRESS HASHCASH] The comment’s server IP (70.32.68.17) doesn’t match the comment’s URL host IP (70.32.68.185) and so is spam.
[...] the new course updating the progressive player to work with Sprint 7, and I wrote a few notes about the major differences between OSMF 0.5 and 0.7 in a post on this blog last month. Also note that, by the time the course was published by Adobe, OSMF had already moved [...]
[...] the new course updating the progressive player to work with Sprint 7, and I wrote a few notes about the major differences between OSMF 0.5 and 0.7 in a post on my personal blog last month. Also note that, by the time the course was published by Adobe, OSMF had already moved [...]