summaryrefslogtreecommitdiffstats
path: root/templates/part.content.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/part.content.php')
-rw-r--r--templates/part.content.php28
1 files changed, 11 insertions, 17 deletions
diff --git a/templates/part.content.php b/templates/part.content.php
index 6454adb4e..d15b9124c 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -125,26 +125,20 @@
</span>
</div>
-
-
<div class="enclosure" ng-if="item.enclosureLink">
- <news-enclosure type="{{ ::item.enclosureMime }}"
- link="{{ ::item.enclosureLink }}">
- <p class="enclosure-error">
- <?php
- p($l->t('Browser can not play media type'))
- ?>: {{ ::item.enclosureMime }}
- </p>
- <a class="button"
- ng-href="{{ ::item.enclosureLink | trustUrl }}"
- target="_blank"
- rel="noreferrer"
- >
- <?php p($l->t('Download')) ?>
- </a>
- </news-enclosure>
+ <video controls preload="none" ng-if="Content.getMediaType(item.enclosureMime) =='video'" news-play-one>
+ <source ng-src="{{ item.enclosureLink|trustUrl }}" type="{{ item.enclosureMime }}">
+ </video>
+ <button ng-if="Content.getMediaType(item.enclosureMime) == 'audio'" ng-click="App.play(item)"><?php p($l->t('Play audio')) ?></button>
+ <a ng-show="Content.getMediaType(item.enclosureMime) =='video'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <?php p($l->t('Download video')) ?>
+ </a>
+ <a ng-show="Content.getMediaType(item.enclosureMime) =='audio'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <?php p($l->t('Download audio')) ?>
+ </a>
</div>
+
<div class="body" news-bind-html-unsafe="item.body"></div>
</div>