diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-28 20:35:05 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-01-28 20:35:05 -0800 |
commit | 56d1614ea6ddfd72df1241a7f2cbe927e38e2a8b (patch) | |
tree | 8aefbfcd4fb3ef72d383c440790299b64d218603 /include/bbcode.php | |
parent | c3e365ef4718e4c9d06eb962cb3deeb9fb39a2d9 (diff) | |
download | volse-hubzilla-56d1614ea6ddfd72df1241a7f2cbe927e38e2a8b.tar.gz volse-hubzilla-56d1614ea6ddfd72df1241a7f2cbe927e38e2a8b.tar.bz2 volse-hubzilla-56d1614ea6ddfd72df1241a7f2cbe927e38e2a8b.zip |
provide a default video image if nothing else is available. Allow sites to change it.
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 2b8274c0f..0c85a0a4e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -108,7 +108,11 @@ function tryzrlvideo($match) { if($zrl) $link = zid($link); - return '<video controls="controls" preload="none" src="' . str_replace(' ','%20',$link) . '" style="width:100%; max-width:' . App::$videowidth . 'px"><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></video>'; + $static_link = get_config('system','video_default_poster','images/video_poster.jpg'); + if($static_link) + $poster = 'poster="' . escape_tags($static_link) . '" ' ; + + return '<video ' . $poster . ' controls="controls" preload="none" src="' . str_replace(' ','%20',$link) . '" style="width:100%; max-width:' . App::$videowidth . 'px"><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></video>'; } // [noparse][i]italic[/i][/noparse] turns into |