You are here

media-audio.html.twig in Media entity audio 8.3

Default theme implementation for an audio.

Available variables:

  • sources: list of audio sources
  • attributes: HTML attributes to be applied to the list.

File

templates/media-audio.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for an audio.
  5. *
  6. * Available variables:
  7. * - sources: list of audio sources
  8. * - attributes: HTML attributes to be applied to the list.
  9. *
  10. * @see template_preprocess_media_audio()
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <audio {{ attributes }}>
  16. {%- for source in sources -%}
  17. {%- if source.type -%}
  18. <source src="{{ source.url }}" type="{{ source.type }}">
  19. {%- else -%}
  20. <source src="{{ source.url }}">
  21. {%- endif -%}
  22. {%- endfor -%}
  23. </audio>