From 99f943f68e3a6bd43d9b5b90f39e058ee2acfa9d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Fri, 2 Aug 2013 23:53:28 +0100 Subject: added poster attribute to video if jpg or png with same file name exists --- inc/parser/xhtml.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index bb5f6a4d2..8b7405402 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1278,9 +1278,15 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // mp4 would be 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', but Android doesn't like it $types['mp4'] = ''; $alternatives = media_alternativefiles($src, $extensions); + $poster = media_alternativefiles($src, array('jpg', 'png'), true); + $posterUrl = ''; + if (!empty($poster)) { + $posterUrl = ml(reset($poster),array('cache'=>$cache),true,'&'); + } - // @todo: add poster - $this->doc .= '