Skip to content
Snippets Groups Projects
Commit e5f8116e authored by Pierre Fleutot's avatar Pierre Fleutot
Browse files

Ajout lecture des sons des prononciations. Fix récupération accent suite changement wikstraktor

parent 34d37895
No related branches found
No related tags found
No related merge requests found
......@@ -161,8 +161,8 @@ class WiktionaryManager
'id' => $wikPronunciation['id'],
'api' => $wikPronunciation['transcript'],
];
if (isset($wikPronunciation['accent'])) {
$pronunciation['accent'] = $wikPronunciation['accent'];
if (isset($wikPronunciation['accents'])) {
$pronunciation['accent'] = $wikPronunciation['accents'][0];
}
if (isset($wikPronunciation['sounds'])) {
$pronunciation['sounds'] = $wikPronunciation['sounds'];
......
......@@ -43,6 +43,13 @@
{% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %}
{{ pronunciation.api }}
{% for sound in pronunciation.sounds|default([]) %}
<audio controls>
<source src="{{ sound.url }}" type="audio/ogg">
{# <source src="horse.mp3" type="audio/mpeg">#}
Your browser does not support the audio element.
</audio>
{% endfor %}
{{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }}
{{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }}
<br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment