Quick follow up on enclosure support in the latest BE build. I made a slight change to make it easier to use and better play with multiple extensions – the media directory location setting has been deprecated. BE will turn your media file into enclosure no matter where you put it - as long as it is local to your server and valid (physically exists).

Basic logic

  • If enclosure support turned on (checked in the admin/settings)
  • For all supported media formats
  • For each posts
  • If post has link to media file of this format
  • If this file physically exists on the server
  • Create enclosure for this file

Mini Q&A session

Do I need extension to use enclosure?

No, you can simply upload media file anywhere on your blog and add a link to this file in your post – BE will turn it into enclosure when serving the feed.

Why would I need an extension?

Extensions can be used to let visitors play media files on the site. Extension can “automatically” (from the user perspective) inject link to media file into the RSS feed and BE will turn it into enclosure.

I’m writing a media player extension, what do I do to make it support enclosures?

In your extension, you’ll need to parse post and, on feed serving, instead of loading player, write link to the media file. Here is an example:

if (e.Location == ServingLocation.Feed)
{
   // inject link
   string link = "<a href=\"{0}\">{1}</a>";
   link = string.Format(link, url, filename);
   e.Body = e.Body.Replace(match.Value, link);
}
else
{
   //TODO: inject player in the post
}

What media types support enclosures?

Supported types include "m4a", "mp3", "mov", "mp4", "m4v", and "pdf".

Do you support multiple enclosures?

Some RSS readers support multiple enclosures, others do not. Single enclosure support is a lower denominator – we will stick with singles until multiple enclosures become mainstream (if ever). BE will break loop after finding link to the first valid media file in the blog post.

Can't find answer on your question?

Leave a comment :)

Where I can get more information?

Check out podcasting technical specifications on iTunes site.

Share/Save/Bookmark
Signature

Comments

3/25/2008 10:52:37 PM #

Rodrigo Garcia

Hy !

First, gratz on the nice work here...
But my question is, any guess on when a new release including this will be available ? I'm drooling to this as it will solve my last need, in the blog/rss/podcast request list...

Thanks anyways, and again... nice work !!!

Rodrigo Garcia |

3/26/2008 4:21:57 AM #

rtur.net

All I can say - its coming this spring and March is almost over...

rtur.net |

9/20/2008 7:23:27 PM #

Jay Smith

I am trying to get BlogEngine 1.4.5 to render the enclosure tag in the feed.  I have enabled enclosures for the feed, but don't think I am adding the media to the post correctly.

Any pointers on how to get this working?

Jay

Jay Smith |

Comments are closed
<<  March 2010  >>
SuMoTuWeThFrSa
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Enhanced with Snapshots

Subscribe to Rtur.net