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.

Signature

Related posts

Comments

3/25/2008 2:52:37 PM

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/25/2008 8:21:57 PM

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

rtur.net

Add comment


 

  Country flag

biuquoteimg
Loading



<<  July 2008  >>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
Enhanced with Snapshots

Subscribe to Rtur.net