This won’t work on AnkiDroid if you have any other scripts after the autoclicking one because of the bug I linked above. AnkiDroid uses href
attribute instead of onclick
, as desktop Anki does, so calling click() on the audio element prevents the rest of the card from loading. There is a workaround in the same bug report though, and there is an alternative implemented in this template (in case you are interested in Memrise stuff). At their core, both build on the same method you described, though.
In terms of working without disabling Anki autoplay, it does interrupt playing back of all the other files, but there is a small delay during which a fraction of the first audio may be heard, so disabling autoplay in Deck settings still seems preferable.