davet
September 26, 2026, 5:59pm
1
On Windows 10 laptop, using Cloze cards.
I want audio- 1 to play automatically but keep audio- 2 hidden behind a clickable button. Audio is set to ‘Play automatically’. How do I alter the following code to do this?
'''''''
</>
{{Audio- 1}}
{{Audio- 2}}
{{type:cloze:Text}} {{cloze::Text}}
<br>><hr>> <br>
<div style='font-family: "Arial"; font-size: 20px;'></div> {{Back- Extra}}<br> <br><br>
''''''
</>
If you only have a single audio file in the first audio field, just add the following script to the respective side of your card template:
<script>
document.querySelector(".soundLink").click();
</script>
It would work better if you disable audio autoplay in deck settings to avoid occasional double playback on card opening.
For a more elaborate solution, check out this thread:
I have a card type that autoplays several media fields in sequence – some fields have a single audio file ([sound:__.mp3] tag), some multiple.
My goal:
Every now and then, I have a note where I want some of the audio files to autoplay, but for others to be skipped. I want the skipped ones to still show up as play buttons, so I can manually play them if I want to – but it’s fine (or even preferrable) if they look a little different than the standard play button. Needs to work on Desktop and Ank…