<%- js_ex(theme.static_prefix.aplayer, 'APlayer.min.js', 'defer') %>
<%- css_ex(theme.static_prefix.aplayer, 'APlayer.min.css') %>
<script type="text/javascript">
  var oldLoadAp = window.onload;
  window.onload = function () {
    oldLoadAp && oldLoadAp();

    new APlayer({
      container: document.getElementById('aplayer'),
      fixed: true,
      autoplay: '<%= theme.aplayer.autoplay %>' === 'true',
      loop: '<%= theme.aplayer.loop %>',
      order: '<%= theme.aplayer.order %>',
      theme: '<%= theme.aplayer.theme %>',
      preload: 'none',
      audio: <%- JSON.stringify(theme.aplayer.songs || []) %>
    });
  }
</script>
