BlogEngine.NET Extension: Flash Video Player

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

[flv:oregon.flv]

Download:

22 thoughts on “BlogEngine.NET Extension: Flash Video Player

  1. 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. 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.

  3. 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

  4. 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?

  5. 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.

  6. 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???

  7. Thanks, this is pretty cool. Finally forced me to update from 1.2 as well (adding [i]FlashVideoPlayer.cs[/i] to the extensions folder will crash this version).

  8. does this work with the latest version of blogengine? Can it play swf files too? thanks

  9. 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.

  10. Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I acquire actually enjoyed account your blog posts.
    Any way I’ll be subscribing to your feeds and even I
    achievement you access consistently fast.

  11. Excellent post. I was checking constantly this blog and I’m impressed!
    Extremely helpful info specifically the last part :
    ) I care for such information a lot. I was looking for this particular
    info for a very long time. Thank you and best of luck.

Comments are closed.