provide a default video image if nothing else is available. Allow sites to change it.
This commit is contained in:
parent
c3e365ef47
commit
56d1614ea6
@ -120,9 +120,9 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$siteinfo = self::parseurl_getsiteinfo($url);
|
$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);
|
$template = str_replace('url','zrl',$template);
|
||||||
|
|
||||||
if($siteinfo["title"] == "") {
|
if($siteinfo["title"] == "") {
|
||||||
|
BIN
images/video_poster.jpg
Normal file
BIN
images/video_poster.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -108,7 +108,11 @@ function tryzrlvideo($match) {
|
|||||||
if($zrl)
|
if($zrl)
|
||||||
$link = zid($link);
|
$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
|
// [noparse][i]italic[/i][/noparse] turns into
|
||||||
|
Reference in New Issue
Block a user