aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index a41b35860..c0bc90b2d 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -373,13 +373,18 @@ class FreshRSS_Feed extends Minz_Model {
$elinks[$elink] = true;
$mime = strtolower($enclosure->get_type());
$medium = strtolower($enclosure->get_medium());
+ $length = $enclosure->get_length();
if ($medium === 'image' || strpos($mime, 'image/') === 0) {
$enclosureContent .= '<p class="enclosure-content"><img src="' . $elink . '" alt="" /></p>';
} elseif ($medium === 'audio' || strpos($mime, 'audio/') === 0) {
$enclosureContent .= '<p class="enclosure-content"><audio preload="none" src="' . $elink
+ . ($length == null ? '' : '" data-length="' . intval($length))
+ . '" data-type="' . htmlspecialchars($mime, ENT_COMPAT, 'UTF-8')
. '" controls="controls"></audio> <a download="" href="' . $elink . '">💾</a></p>';
} elseif ($medium === 'video' || strpos($mime, 'video/') === 0) {
$enclosureContent .= '<p class="enclosure-content"><video preload="none" src="' . $elink
+ . ($length == null ? '' : '" data-length="' . intval($length))
+ . '" data-type="' . htmlspecialchars($mime, ENT_COMPAT, 'UTF-8')
. '" controls="controls"></video> <a download="" href="' . $elink . '">💾</a></p>';
} elseif ($medium != '' || strpos($mime, 'application/') === 0 || strpos($mime, 'text/') === 0) {
$enclosureContent .= '<p class="enclosure-content"><a download="" href="' . $elink . '">💾</a></p>';