<?
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2012 Timble CVBA. (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */
defined('FOLIOKIT') or die; ?>

<?= helper('player.load', ['selector' => '.docman_player']); ?>

<audio class="docman_player"
    data-media-id="<?= $document->id ?>"
    data-plyr-config="<?= htmlentities(\Foliolabs\WP::wp_json_encode(['controls' => $controls])) ?>"
    data-title="<?= escape($document->title) ?>"
    data-category="docman"
    preload="none"
    controls>
    <source src="<?= $document->download_link ?>" type="audio/<?= $document->extension ?>" />
</audio>
