elevenlabs_field-1.0.0-beta7/templates/elevenlabs-field.html.twig
templates/elevenlabs-field.html.twig
{#
/**
* @file
* Template for an ElevenLabs Field.
*
* Available variables:
* - global_button_attributes: The attributs for the global button. THIS HAS
* TO BE PRESENT TO PLAY EVERYTHING VIA JS.
* - global_play_button_enabled: If the play button is enabled.
* - global_play_button_text: The text of the play button.
* - speeches: Array of speeches to be outputted.
* - speech_list_enabled: If the speech list is enabled.
* - virtual_player_enabled: If the virtual player should show up.
*
* @ingroup themeable
*/
#}
{% if global_play_button_enabled %}
<button {{ attributes }}>{{ global_play_button_text }}</button>
{% endif %}
{% if virtual_player_enabled %}
<div id="audio-player-container">
<button {{ attributes }}>{{ global_play_button_text }}</button>
<span id="current-time" class="time">0:00</span>
<input type="range" id="seek-slider" max="1000" value="0">
<span id="duration" class="time">0:00</span>
</div>
{% endif %}
{% if speech_list_enabled %}
<div class="el-transcript">
{% for speech in speeches %}
{{ speech }}
{% endfor %}
</div>
{% endif %}
