Example feed: https://zorro.casa/temporary/feed.atom
Try in Firefox's feed viewer and TinyTiny RSS itself. Note that the article links themselves don't exist; that's not relevant.
TinyTiny RSS HTML output (as shown in Firefox dev tools)
Video (working)
Code: Select all
<p>
Some content goes here. Here's the video:
<video controls="controls"><source type="video/ogg" src="https://zorro.casa/temporary/water-and-wind.ogv"><a type="video/ogg" href="https://zorro.casa/temporary/water-and-wind.ogv" rel="noopener noreferrer" target="_blank">A royalty-free video. Please don't sue me.</a>
</video></p>
Notice the <source type="video/ogg" src="https://zorro.casa/temporary/...">, an absolute link.
Audio (broken)
Code: Select all
<p>
Some content goes here. Here's the audio:
<audio controls="controls"><source type="audio/mpeg" src="random-spontaneous_devotion.mp3"><a type="audio/mpeg" href="https://zorro.casa/temporary/random-spontaneous_devotion.mp3" rel="noopener noreferrer" target="_blank">A royalty-free song. Please don't sue me.</a>
</audio></p>
Notice the <source type="audio/mpeg" src="...">, still relative.
Actual feed content
Video
Code: Select all
<p>
Some content goes here. Here's the video:
<video controls="controls">
<source type="video/ogg" src="water-and-wind.ogv" />
<a type="video/ogg" href="water-and-wind.ogv" rel="noopener noreferrer" target="_blank">A royalty-free video. Please don't sue me.</a>
</video>
</p>
Audio
Code: Select all
<p>
Some content goes here. Here's the audio:
<audio controls="controls">
<source type="audio/mpeg" src="random-spontaneous_devotion.mp3" />
<a type="audio/mpeg" href="random-spontaneous_devotion.mp3" rel="noopener noreferrer" target="_blank">A royalty-free song. Please don't sue me.</a>
</audio>
</p>
All regular expressions involving the <video> tag will also need to handle <audio>, such as this...
Code: Select all
$entries = $xpath->query('(//a[@href]|//img[@src]|//video/source[@src])');
These changes may require handling another extension type other than .mp4 and .png. For reference, see commit 5edd605a.
I planned on making a pull request, only to realize the deeper I dug that I'm not really sure where all in TinyTiny RSS will need changed. I can still try if you prefer.
System details
- TinyTiny-RSS 270c0a0 (git from tt-rss.org GitLab)
- nginx 1.10.0-0ubuntu0.16.04.4
- PostgreSQL 9.5.5-0ubuntu0.16.04
- PHP 7.0.13-0ubuntu0.16.04.1
- Ubuntu 16.04 x86_64, Intel
Full feed content (for posterity)/in case server goes down
Code: Select all
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://zorro.casa/temporary/">
<title type="text">Shane's Test Feed for TinyTiny RSS</title><subtitle type="text">You'll find proof of concepts in here. No real blogs.</subtitle>
<id>https://zorro.casa/temporary/feed.atom#4</id><link rel="self" type="application/atom+xml" href="https://zorro.casa/temporary/feed.atom" />
<entry>
<author><name>Shane</name><uri>https://zorro.casa/</uri></author>
<title type="text">Example post with HTML5 audio</title><id>https://zorro.casa/temporary/html5-audio#4</id><link rel="alternate" type="text/html" href="https://zorro.casa/temporary/html5-audio" />
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><article>
<p>
Some content goes here. Here's the audio:
<audio controls="controls">
<source type="audio/mpeg" src="random-spontaneous_devotion.mp3" />
<a type="audio/mpeg" href="random-spontaneous_devotion.mp3" rel="noopener noreferrer" target="_blank">A royalty-free song. Please don't sue me.</a>
</audio>
</p>
</article></div></content>
</entry>
<entry>
<author><name>Shane</name><uri>https://zorro.casa/</uri></author>
<title type="text">Example post with HTML5 video</title><id>https://zorro.casa/temporary/html5-video#4</id><link rel="alternate" type="text/html" href="https://zorro.casa/temporary/html5-video" />
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><article>
<p>
Some content goes here. Here's the video:
<video controls="controls">
<source type="video/ogg" src="water-and-wind.ogv" />
<a type="video/ogg" href="water-and-wind.ogv" rel="noopener noreferrer" target="_blank">A royalty-free video. Please don't sue me.</a>
</video>
</p>
</article></div></content>
</entry>
</feed>