audioplayer--mediaelement.html.twig 977 B

123456789101112131415161718192021222324252627
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for Media Element audio player.
  5. *
  6. * Available variables:
  7. * - plugin_id: the name of the plugin being used for templating.
  8. * - plugin_theme: the name of the specific plugin theme, if it exists.
  9. * - files: array of render info for each file.
  10. * - settings: array of settings for thie player.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <div class="audiofield">
  16. {% for file in files %}
  17. <div class="audiofield-player">
  18. <div class="mediaelementaudio_frame">
  19. <audio id="mediaelement_player_{{ file.id }}" preload="{% if settings.audio_player_lazyload == 1 %}none{% else %}auto{% endif %}" {% if settings.audio_player_autoplay == 1 %} autoplay="autoplay" {% endif %} controls>
  20. <source src="{{ file.url }}">
  21. Your browser does not support the audio element.
  22. </audio>
  23. </div>
  24. <label for="mediaelement_player_{{ file.id }}">{{ file.description }}</label>
  25. </div>
  26. {% endfor %}
  27. </div>