Open JLBA opened 3 months ago
I think this should be changed in the news*.html5 template if needed and not be a default behavior of this bundle. We would have to provide 4 additional modified templates (news*.html5) which could potentially change in contao/news-bundle and affect compatibility.
You can easily output an audio element with the podcast file like this in one of the news_*.html5 templates:
<?php
if ($this->podcastFile){
$file = Contao\FilesModel::findByUuid(Contao\StringUtil::binToUuid($this->podcastFile));
?>
<audio controls>
<?php $this->addCspSource('media-src', $file->path); ?>
<source src="<?= $file->path ?>" type="<?= $file->mime ?>">
</audio>
<?php
}
?>
I'll keep it in mind though, maybe I will add something like that in the future. But currently you will have to edit the template yourself.
Works fine. Thanks for your answer. And waiting for the update with specific models... ;-)
Hello, I'm testing contao-podcast-fedd-bundle. I understand it is aimed to add podcast files to rss or atom feed.
But is it possible to modify news_list and/or news_reader models to add directly the audi file (using contao audio/video function) ?
Thanks