<?php

// Add the mediaelement style sheet
$GLOBALS['TL_CSS'][] = 'assets/jquery/mediaelement/'. $GLOBALS['TL_ASSETS']['MEDIAELEMENT'] .'/css/mediaelementplayer.min.css|static';

?>

<script type="text/javascript" src="<?= TL_ASSETS_URL ?>assets/jquery/mediaelement/<?= $GLOBALS['TL_ASSETS']['MEDIAELEMENT'] ?>/js/mediaelement-and-player.min.js"></script>
<script type="text/javascript">
  /* <![CDATA[ */
  (function($) {
    $(document).ready(function() {
      $('video,audio').mediaelementplayer({
        // Put custom options here
        pluginPath: '<?= TL_PATH ?>/assets/jquery/mediaelement/<?= $GLOBALS['TL_ASSETS']['MEDIAELEMENT'] ?>/',
        flashName: 'legacy/flashmediaelement.swf',
        silverlightName: 'legacy/silverlightmediaelement.xap'
      });
    });
  })(jQuery);
  /* ]]> */
</script>
