aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-28 20:35:05 -0800
committerzotlabs <mike@macgirvin.com>2018-01-28 20:35:05 -0800
commit56d1614ea6ddfd72df1241a7f2cbe927e38e2a8b (patch)
tree8aefbfcd4fb3ef72d383c440790299b64d218603
parentc3e365ef4718e4c9d06eb962cb3deeb9fb39a2d9 (diff)
downloadvolse-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.
-rw-r--r--Zotlabs/Module/Linkinfo.php4
-rw-r--r--images/video_poster.jpgbin0 -> 28936 bytes
-rw-r--r--include/bbcode.php6
3 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index 78c34583e..3392e4114 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -120,9 +120,9 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$siteinfo = self::parseurl_getsiteinfo($url);
- // If this is a Red site, use zrl rather than url so they get zids sent to them by default
+ // If the site uses this platform, use zrl rather than url so they get zids sent to them by default
- if( x($siteinfo,'generator') && (strpos($siteinfo['generator'], \Zotlabs\Lib\System::get_platform_name() . ' ') === 0))
+ if(is_matrix_url($url))
$template = str_replace('url','zrl',$template);
if($siteinfo["title"] == "") {
diff --git a/images/video_poster.jpg b/images/video_poster.jpg
new file mode 100644
index 000000000..7e4220861
--- /dev/null
+++ b/images/video_poster.jpg
Binary files differ
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