]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/templates/includes/audio.html
player: remove usage of id attribute in audio player
[panikweb.git] / panikweb_templates / templates / includes / audio.html
index 5cb813adad096ac2ac4155bc24eff65959094fd4..e23cce2d2224cdb79243984b0611457b12b4a7e2 100644 (file)
@@ -4,21 +4,21 @@
                {% if not embed %}
                <button class="resymbol icon-plus-sign big"
                        title="{% trans "Add to playlist" %}"
+                       data-sound-id="{{ sound.id }}"
                        data-player-audio="Audio-{{ sound.file.url|slugify }}" 
                        data-player-action="registerAudio" 
-                       id="addToPlaylist-{{ sound.file.url|slugify }}"
                        ><span class="sr-only">{% trans "Add to playlist" %}</span></button>
                {% endif %}
                <button class="resymbol icon-play-sign big"
                        title="{% trans "Play" %}"
-                       data-player-audio="Audio-{{ sound.file.url|slugify }}" 
+                       data-sound-id="{{ sound.id }}"
                        data-player-action="playAudio" 
                        ><span class="sr-only">{% trans "Play" %}</span></button>
                {% if embed %}
                <button class="icons icon-pause big"
                        title="{% trans "Pause" %}"
                        style="display: none;"
-                       data-player-audio="Audio-{{ sound.file.url|slugify }}" 
+                       data-sound-id="{{ sound.id }}"
                        data-player-action="pauseSounds" 
                        ><span class="sr-only">{% trans "Pause" %}</span></button>
                {% endif %}
                {{ sound.title }}
        </div>
        {% endif %}
-       <audio 
+       <audio
                data-player='true'
                class='hidden'
                data-url="{% url 'episode-view' emission_slug=sound.episode.emission.slug slug=sound.episode.slug %}"
                data-sound-id="{{ sound.id }}"
                {% if sound.fragment and sound.title %}title="{{ sound.title }}"
                {% else %}title="{{sound.episode.title}}"{% endif %}
-               id="Audio-{{ sound.file.url|slugify }}" 
                preload="{% if preload %}{{ preload }}{% else %}none{% endif %}"
                controls="{% if controls %}{{ controls }}{% else %}controls{% endif%}"
                >