I’m currently developing a web-app I use to fetch various data in order to learn Japanese, which I then proceed to render within anki, using the following:
So my guesses are that anki either disabled audio tags, or that they can only work with local files.
Does anyone know whether there’s a way to fix this ? I’ll try some npm package, see if custom made audio players do the trick, but if I could avoid using external libraries that’d be great.
The perfect solution would be if there already were an anki plugin to fix that very specific issue.
More details. I displayed window.navigator.userAgent and Anki shows:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.14.2 Chrome/77.0.3865.129 Safari/537.36
Chrome Desktop
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
Safari Desktop
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
Surprisingly, both Chrome and Anki show the same versions for AppleWebKit. So not sure how to reliably determine what capabilities the QtWebEngine supports.
Based on some cursory Googling, it seems like AAC support is mainly a licensing issue.
As always, I thought about pretty much everything BUT the file format.
I now fetch the audio files in mp3 format and it does work flawlessly. I assumed that since Anki is based on Chromium, it would be able to handle pretty much anything I’d throw at it, provided it worked in the browser.
Audio codec support across browser engines have not been 1:1, it’s all about licensing, internet politics and so on. At least MP3 is accepted by Mozilla today.