Skip to content

Commit

Permalink
Update Feed.class.php
Browse files Browse the repository at this point in the history
Add audio enclosure support for some ogg audio feeds such as: https://www.april.org/taxonomy/term/1908/all/feed
  • Loading branch information
kvnco authored and Simounet committed May 4, 2021
1 parent 43872bd commit fda5920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Feed.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected function getEnclosureHtml($enclosure) {
$enclosureType = $enclosure->get_type();
if (strpos($enclosureType, 'image/') === 0) {
$html .= '<img src="' . $enclosure->link . '" />';
} elseif (strpos($enclosureType, 'audio/') === 0) {
} elseif (strpos($enclosureType, 'audio/') === 0 || strpos($enclosureType, 'application/ogg') === 0) {
$html .= '<audio src="' . $enclosure->link . '" preload="none" controls>'._t('BROWSER_AUDIO_ELEMENT_NOT_SUPPORTED').'</audio>';
} elseif (strpos($enclosureType, 'video/') === 0) {
$html .= '<video src="' . $enclosure->link . '" preload="none" controls>'._t('BROWSER_VIDEO_ELEMENT_NOT_SUPPORTED').'</video>';
Expand Down

0 comments on commit fda5920

Please sign in to comment.