tribut / ttrss-videoframes

TT-RSS plugin to enable embedded videos in feeds
93 stars 8 forks source link

Adding videos to RSS output #7

Open belzecue opened 11 years ago

belzecue commented 11 years ago

Any way to hook into this to show videos in the public RSS output feeds? Is that possible? Thanks.

tribut commented 11 years ago

Hm, not sure what you're asking. Do you want to rewrite the exported feeds containing videos in order to replace flash objects with iframes? Other than that, it's really the responsibility of the app viewing you feed to render the videos correctly.

belzecue commented 11 years ago

With the Videoframes plugin active, I can see Youtube videos embedded as a normal TTRSS user. But the exported/published RSS feed (e.g. http://site.com/ttrss/public.php?op=rss&id=14&is_cat=1&key=e0543e3f0636d201a044b7e62b239c9703a36c6d) still omits the videos. To get the RSS output to include video content I need to hook the Videoframes code/plugin into the module producing the RSS output, e.g. functions.php, so that the same embedding takes place in RSS output as with user in-browser viewing. Then videos will show up in the RSS feed too.

tribut commented 11 years ago

Maybe I should clarify what the videoframe plugin actually does. It does not insert the videos into the content. They are already there in the original feed. They are, however, included in a way that is incompatible with the way tt-rss displays feeds (plugins inside iframe containers, which are automatically sandboxed) or cannot be displayed at all by some users (direct embedding of a flash object in the page which can't be automatically adapted based on the device used). If you export a feed, it won't "omit" the videos. It may however include it in a way that some rss clients can't directly display. So maybe you want to tell me something about your usecase here.

belzecue commented 11 years ago

Thanks, tribut, but I'm puzzled why you insist video content is being included in the RSS feed. It demonstrably isn't.

Here is one entry from the raw source from http://[mysite].com/ttrss/public.php?op=rss&id=428&key=29c0891b9bf2b35a896571ae9143b7ece2be26e3

As you can see below, the RSS code contains no video info. However, the entry does show a Youtube video when viewed within TTRSS in the browser (with Videoframe enabled):

http://pastebin.com/j5yjYbGS

So you will agree that the TTRSS published/shared RSS output for this entry contains no code for a Youtube video, despite it showing within TTRSS with Videoframe enabled.

Here is the original RSS source for the entry: http://www.gointothestory.com/feeds/posts/default?alt=rss

And here is the corresponding entry in my test case direct from the RSS source:

http://pastebin.com/mWEm3njt

So TTRSS is demonstrably stripping out the iframe when publishing its own category RSS feed. Is there any way to stop it doing this?

tribut commented 11 years ago

Thanks for your input. Apparently the exported feed is sanitized as well, but doesn't call the same hooks. I wasn't aware of that. I will check whether there is an appropriate hook that I can use to implement that feature.

belzecue commented 11 years ago

Many thanks. (Sorry for the initial munged previous post, before I converted it to pastebin.)