Anki’s auto-play feature plays all audio files in a card, including the ones that have been hidden. Is it possible to have the auto-play feature only play the files that are not hidden?
This currently breaks the functionality of @AnkiQueen’s randomised templates or the current #1 Russian deck on AnkiWeb if you try to use auto-play on them. The latter’s author told me it’s also possible to provide an auto-play API of sorts from Anki’s side.
Still confused as to what you’re asking for. As it stands the card renderer picks out av tags ([sound:...] etc) and autoplays them.
You can’t put a hidden or display:none on an av tag, so what is your addon adding exactly? An <audio> tag? Or applying hidden to the html block surrounding the av tag?
If it’s the latter, then the card renderer parser is going to have to parse html on top of the av tag syntax, which, and I could be mistaken, is highly unlikely to be added.
Your best bet might be to write an addon that uses the reviewer_will_play_question_sounds and beautifulsoup to parse the rendered html and see which tags are enclosed in a hidden html element.
I’m not using any add-ons. The note types I’m facing the problem in hide the fields in a <div> (in the template) and Anki’s auto-play feature still reads them out.
Unfortunately, I use AnkiDroid so that’s not feasible. If there’s a way to use JS to trigger a click after the audio file has loaded, I’d appreciate help.
Regardless, users need to turn off auto-play in the top Russian deck on AnkiWeb and so I wish this worked out of the box for everyone. I’m hoping dae can help.