tags:

views:

984

answers:

4

We have a custom-built Flash-based video player that I maintain, and it needs to support preroll ads and ideally both progressive video playback and streaming depending on a server switch.

I've been working with the flvPlayback component but am finding myself a little out of my depth. Are there any good tutorials or resources for understanding the difference between netstream and flvPlayback? Or is one part of the other? Have googled without success.

For the preroll ads we'll probably use DART In-Stream, which is part of the reason I feel I'm losing a grip on the best way to structure this thing.

Any help with best practices or links most appreciated - ta!

+4  A: 

I would definitely have a look at the JW Flash Media Player:

http://www.jeroenwijering.com/?item=JW_FLV_Player

It's Open Source, and I found the Source quite clean and easy to understand, it also supports playlists. I don't know the DART In-Stream stuff, but maybe you could "creatively use" the playlist feature to achieve that?

Source Code is available here:

http://code.jeroenwijering.com/trac/

Michael Stum
"All LongTail Video products require licenses when used commercially" - so it's not open source as defined by the OSI. The source code is available, but that's not much use if you can't use it.
Draemon
+1  A: 

I don't really like the flvPlayback-component, it's hard to handle both implementation wise and somewhat tricky to skin nicely and it's also quite bloated. So I'd opt to use either the JW Flash Media Player as recommended by Michael above or rolling my own entirely.

grapefrukt
+2  A: 

I've used the FLVPlayBack component for a while now and while it has some quirks I find it to be pretty versatile without having to write a lot of code. The only large drawback I found is that if you try to stream a file that doesn't exist the playstate remains "loading" and never resolves - at that point, you can't load anything else into and it'll stay loading forever.

For what it sounds like you are doing though it should handle that stuff fine - any of the default control bars will handle the status of either your progressive or streaming videos and it has some cool closed captioning features to boot.

As for documentation - Adobe's LiveDocs is really helpful:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html

Can't speak on the DART stuff though - never had to deal with it.

onekidney
+1  A: 

If you are interested in writing your own video player, you should pick up the following book; Learning ActionScript 3 http://www.learningactionscript3.com/. It will give you a great understanding of AS3 and there is also a chapter dedicated to creating your own basic flash player, which you can then build upon.

jrutter