I want to be able to control the autoplay feature for each independent audio tag.
I’ve seen some solutions using javascript to control which audio files gets autoplayed, but there’s no way to check whether or not a certain audio file has stopped playing, so this solution does not work if you want to play more than one audio file.
A new audio tag syntax might be appropriate.
For example: [!sound:audio.mp3] → audio will never autoplay [@sound:audio.mp3] → audio will always autoplay
I think this is a great idea, because I have cards where I want audio every time as well as cards where I only want audio when I need it. Something like {{tts zh_CN autoplay=true voices=Apple_Tingting:Word}}, where the default is the existing deck setting, would be pretty helpful.
The current solution for me has been to turn off autoplay for all cards and to use this javascript to autoplay audio on particular cards. (If you go through the thread, there are solutions for more complex situations.) The main problem for me is that the javascript causes the mobile app to lag a bit, and maybe it takes a bit longer to play on desktop too.