With {{tts:fieldname}} I can make Anki desktop and mobile read a text to me when I open the card. Also a play button is added to the card so I can replay it.
How can I prevent Anki from playing it to me automatically when I open the card and ONLY play it to me when I press the play button?
1 Like
mmdj2
June 18, 2020, 8:31pm
2
go to deck options -> general and uncheck automatically play audio
1 Like
mmdj2
May 12, 2021, 10:31am
4
I personally don’t know
but I did some digging and here’s what I found:
Unfortunately, it did not work. But I found another code on Reddit that worked:
<script>
var elem = document.querySelector(".soundLink, .replaybutton"); // AnkiMobile & AnkiDroid / AnkiDesktop
if (elem) { elem.click(); }
</script>
But the problem with this code is that, when you disable the autoplay, it still plays the first audio. Is there a solution for this? Thanks in advance.
https://anki.tenderapp.com/discussions/ankidesktop/23193-disable-autoplay-for-specific-fields
2 Likes
See my post for a solution:
You can overcome Anki’s innate play audio function with a script (multiple sound files will not play in sequence). However, the first sound file will still play automatically and display a play button. To get around this I used a silent sound file (2 sec), and hid its button with CSS.
This script will stop multiple audio files on a card from playing - insert it at the top of the card template you want to control.
<script>
var elem = document.querySelector(".soundLink, .replaybutton"); // Ank…
(this option still doesn’t work)