John Dyer

Technology and web development in curly bracket languages {Javascript, C#, ActionScript}

BlogEngine.NET Extension: Flash Video Player

by John Dyer 5. February 2008 00:13

Last week, I posted a flash video using flvplayer extension from betaparticle for BlogEngine.NET. I wanted to make some adjustments to the extension and I ended up completely rewriting it.

Updates/improvements:

  • Plays FLV or MP4.
  • All properties are available in the BlogEngine.NET extension manager so you don't have to touch the code to change settings.
  • The size of the player will automatically make room for the controls at the bottom (20px)
  • Uses SWFObject for flash replacement. This allow graceful degradation for those without Flash including mobile users. (I'll upgrade it to SWFObject 2.0 when it's released)
  • Enables Fullscreen playback.
  • Shows an initial image at startup named the same as the flv (myvideo.flv and myvideo.jpg). This way the video is not black at startup.
  • Optionally, instead of SWFObject, full <object><embed> formatting can be used.

Credits

Uses

Installation & Usage

  1. Download the file and unzip: Flash Video Player extension for BlogEngine.NET
  2. Copy FlashVideoPlayer.cs to /App_Code/Extensions/
  3. Copy the flashvideo folder to the root of your application (this can be customized in the settings)
  4. Add videos (myvideo.flv or myvideo.mp4) and images (myvideo.jpg) to the flashvideo folder.
  5. To use, just add [flv:myvideo.flv] anywhere in your post.

Example

oregon
This video requires Adobe Flash player

Download:

Comments

2/13/2008 3:46:28 AM # John Dyer John Dyer United States | Reply
Klaus,
Thanks for catching that. It's fixed now...
John Dyer's last post: feedproxy.google.com/.../post.aspx" rel="nofollow">Simple Cross-Browser HTML5 video with a single H.264 file and fallback options
2/25/2008 6:34:30 PM # Thomas Derenthal Thomas Derenthal United States | Reply
I did everything exactly per the instructions and here's what renders:[flv:test.flv]. No video, no nothing. Just the literal text.

I have a flv file called test in the flv directory
2/25/2008 7:32:21 PM # John Dyer John Dyer United States | Reply
Thomas, the main thing you need to be sure of is that the FlashVideoPlayer.cs file is your BlogRoot/App_Code/Extensions folder and that it shows up when you go to BlogRoot/admin/Extension%20Manager/Default.aspx

If it's not showing up there in the list of extensions, then the *.cs file might not be in the right place.
John Dyer's last post: feedproxy.google.com/.../post.aspx" rel="nofollow">Simple Cross-Browser HTML5 video with a single H.264 file and fallback options
6/27/2008 11:24:23 PM # Trevor Trevor United States | Reply
John,

I have followed you instructions yet the [flv:oregon.flv] sample still shows up as text in the post.  For what it is worth, the example you list above looks the same.  I am using the latest BlogEngine available.  Any Ideas what I might be doing wrong?  Thank you for your effort!

Trevor
7/23/2008 10:58:06 PM # Rick Rick United States | Reply
Having same issue as all else.  just shows [flv:oregon.flv] at render.  I am 100% positive that all items (.cs) is int the right place. using 1.4  Any suggestions?
7/23/2008 11:22:46 PM # John Dyer John Dyer United States | Reply
Whoops, it looks like there was a bug in the last update. The line that reads:

e.Location != ServingLocation.SinglePost
should in fact be
e.Location == ServingLocation.SinglePost

Swap that and you'll be good.
John Dyer's last post: feedproxy.google.com/.../post.aspx" rel="nofollow">Simple Cross-Browser HTML5 video with a single H.264 file and fallback options
7/24/2008 7:42:41 AM # Rick Rick United States | Reply
i seem to be having an extension issue altogether
7/24/2008 8:44:36 AM # Rick Rick United States | Reply
John,

I hate to be a bother but I can not seem to get extensions to work at all on my site.  I have blogengine installed 2 other times in different sub-directories and everything works perfect. However, this time I can not get any extension to work???? Any ideas???
8/11/2008 6:09:19 PM # artvin artvin | Reply
Good extensions thanks.
10/24/2008 10:57:56 AM # Alojaweb Alojaweb Peru | Reply
good extension, thanks i need
11/10/2008 4:34:43 PM # Allwyn Allwyn United Kingdom | Reply
Very nice extension and easy to implement
12/15/2008 6:57:53 PM # r r United States | Reply
Thanks, this is pretty cool. Finally forced me to update from 1.2 as well (adding FlashVideoPlayer.cs to the extensions folder will crash this version).
3/18/2009 8:50:30 PM # Johnny Johnny Canada | Reply
does this work with the latest version of blogengine? Can it play swf files too?  thanks
3/18/2009 8:55:56 PM # John Dyer John Dyer United States | Reply
Yes, it should work with all versions of BE.NET. But, not it will not play swf files. It is an SWF file that plays FLVs and MP4s.
John Dyer's last post: feedproxy.google.com/.../post.aspx" rel="nofollow">Simple Cross-Browser HTML5 video with a single H.264 file and fallback options
6/16/2010 9:14:30 AM # philwebservices philwebservices Republic of the Philippines | Reply
Why is that I don't see people using this platform? If there is only a few. Is this platform only for techie guys?
6/18/2010 6:23:48 AM # Website Design Australia Website Design Australia United States | Reply
I agree. I don't see typical blogger use this blogging platform, why? Is this for techie guys only? Hmm probably in time I will consider having this as my blogging platform.
7/2/2010 1:54:16 PM # electronic cigarette electronic cigarette United States | Reply
I hate to be a bother but I can not seem to get extensions to work at all on my site.  I have blogengine installed 2 other times in different sub-directories and everything works perfect. However
electronic cigarette's last post: www.electroniccigarettehub.com/.../...althier.html" rel="nofollow">Electronic Cigarettes - A Healthier Alternative To Smoking
7/31/2010 8:37:21 AM # where to buy where to buy United States | Reply
I was very delighted to find this site.I wanted to thank you for this wonderful read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out new stuff you post.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Web Statistics