Merge pull request #243 from towards-a-new-leftypol/allow_ogg_embed

Allow ogg embed
This commit is contained in:
towards-a-new-leftypol 2021-04-03 19:05:42 -04:00 committed by GitHub
commit 063c11bb1f

View File

@ -372,12 +372,24 @@ $config['youtube_js_html']
. '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image"/>'
. '</a></div>';
$config['ogg_embed_html']
= '<figure><audio controls src="$1">'
. 'Your browser does not support the'
. '<code>audio</code> element.</audio></figure>';
$config['embedding'] = array();
$config['embedding'][0] =
array(
'/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i',
$config['youtube_js_html']
);
$config['embedding'][1] =
array(
'/^(https?:\/\/.*\.ogg)$/i',
$config['ogg_embed_html']
);
$config['additional_javascript'][] = 'js/youtube.js';
/*