I want to autoplay a word audio in both front&back, and IDK why deck audio setting does not autoplay some cards’ front side. Manual play works.
I use code as a workaound but it makes all cards blank in ankidroid v25.09. It works well in desktop v25.09. Both methods failed How do I fix my code or deck audio setting?
function forcePlayback() {
if (CONFIG().settings.playback !== 'force') return
const el = document.querySelector('.VocabAudio .replay-button')
if (el) el.click()
}
Thanks for your efforts, really can not find the solution!
A JavaScript workaround shouldn’t be necessary – on AnkiDroid or on desktop Anki. [I moved your question from the AnkiDroid category, because it sounds like you’re seeing the same behavior on both.]
Do you have auto-play enabled in the Options preset used by those decks/subdecks? Are you sure that the subdecks are all using the preset you think they are?
In your card templates, what do your {{field replacements}} look like for your audio field? Do you have formatting that applies to them that could be interfering?
You saved my life! The problem occurs in preset applies to subdecks. In the process of syncing, several subsubdecks’ presets were missing in ankiweb and I chose download from ankiweb every time without noticing.
Should always check the version in ankiweb!