1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Added 'autoplay' and 'controls' support to the toAudio() method.

This commit is contained in:
Cameron 2020-02-05 13:26:07 -08:00
parent 89fff6faad
commit b8717c04bb

View File

@ -4792,7 +4792,10 @@ class e_parser
$mime = varset($parm['mime'], 'audio/mpeg');
$text = '<audio controls style="max-width:100%">
$autoplay = !empty($parm['autoplay']) ? "autoplay " : "";
$controls = !empty($parm['controls']) ? "controls" : "";
$text = '<audio controls style="max-width:100%" '.$autoplay.$controls.'>
<source src="'.$file.'" type="'.$mime .'">
Your browser does not support the audio tag.
</audio>';