Unable to play audios using the <audio> tag

I’m trying to use an audio tag to play an audio but I can’t make it work for the life of me, what am I doing wrong? (I can’t use [sound:file.mp3] for this usecase).

The console says ´Client disconnected while serving /jack.mp3´

jack.mp3 is exactly how the file is called on /collection.media

<audio controls>
    <source src="jack.mp3" type="audio/mp3">
    Your browser does not support the audio element.
</audio>

[sound:jack.mp3]

{{Front}}

Now regarding the audio problem, still no luck. When I access the file directly via Anki’s URL, it works, so the file is not missing (the attachment is an image of it playing on the browser via the anki server URL). 1. I even tried to use this URL on the audio tag directly, but got the same result.

Could anyone help me?

Have you tried working with an add-on like Inline Media? I’ve only tried <audio> tags with that script/framework, and I know it works there.

When using HTML audio, I do not say which type it its, I just use this: <audio src="ATTS%20outsit(google%20en-us).mp3" controlslist="nodownload" controls=""></audio>.

One problem may be that the chromium engine qt used by anki ships by default does not support your .mp3 encoding format. One solution should be to convert your .mp3 file to some other encoding.

Analyzing my audio on Analyze file format online (do not upload anything private), my audio result was:

Format : MPEG Audio
Format version : Version 2
Format profile : Layer 3
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.