views:

185

answers:

1

Hello all, I'm trying to publish rss feed from a site. Some of the feed items contain embedded video. Now I know for sure that this won't show up in the feed when the feed item contains the object data enclosed within the item's <description> tag. In fact feed validator shows a warning for the same.

Googling for a solution to this problem, I came upon something called mRSS - an extension to RSS by Yahoo which allows you to embed videos inside feeds. However, from the examples they've provided, the embedding always occurs OUTSIDE of the description tags.

My idea is to have the embedded video at par with the flow of the page, i.e. if a page contains a block of text and a video and some more text, then the feed item should preserve the order. The diagrams below should clarify the problem.

What I get:

== HTML Page ==
Text 
Video 
Text

== Feed ==
Text
Text
Video as mRSS or enclosure

What I want:

== HTML Page ==
Text 
Video 
Text

== Feed ==
Text
Video as mRSS
Text

Is this possible with mRSS or any other methods? Has anyone successfully implemented this? Any help will be much appreciated.

A: 

Maybe I'm missing something, but your question reads to me like you are treating RSS and mRSS like markup languages. And this is a mistake--they should be consider APIs instead. RSS ≠ HTML.

RSS and mRSS (and any RSS extension) with anything other than plain text will, in my experience, be treated dramatically differently by different RSS reader. Even individual browsers will treat them differently.

This all begs the question: What software is your feed going to be consumed by?

  • Only a custom, internally developed reader? Then I would suggest changing the reader so that it rendors the <description> with your embedded video so that it formats it to your requirements.
  • Any and all RSS readers? This is going to be a big problem with anything other than plain text. You'll need to accept that your output is going to be hit-and-miss. Not all readers understand all RSS extensions. Embedding your video into the description is probably going to have generally disappointing results, although that may be your only option. Linking to the video is probably your only safe, consistant option.

Sorry if I've wildly misunderstood your question!

Stu Thompson
@Stu: Thanks for your reply. Perhaps I wasn't so clear in my question - but I'm under no assumption that RSS == HTML. What I meant was that most of the "common" HTML formatting tags work fine (paragraphs, bolds etc.) when the block is enclosed within a CDATA declaration inside the RSS description tag. On the same lines, my idea is to dislpay embedded videos in the feeds in the exact location as it appears in the content. If I use enclosures, the video will appear as an attachment at the end of the feed and not within the flow of the content, making it somwhat contextually irrelevant. Cont...
miCRoSCoPiC_eaRthLinG
...As for your queries, the reader may be any of the online / offline readers e.g. Google Reader, FeedReader, FeedDemon etc. But as you said, I don't think it'lll be possible to optimize the feed to render exactly the same across all readers. Still, I want it to render with the video wherever possible. I've come across feeds from several sites where content and videos appear intermittently. So there must be a way of doing so. As of now, W3C FeedValidator reports invalid placement of OBJECT tag within DESCRIPTION :(
miCRoSCoPiC_eaRthLinG
Just to give you some live examples, the following two links, when read through a feedreader appear exactly as they appear on the website, i.e. with the video embedded within the content:1. http://gizmodo.com/5432254/weaponized-i+sobot-mini-humanoid-robot-tries-to-murder-your-other-toys2. http://lifehacker.com/5430600/prep-for-the-holidays-with-diy-magic
miCRoSCoPiC_eaRthLinG