Issue Adding Audio Content in WordPress for App // learn press

24 Views Asked by At

I'm currently facing an issue while trying to add audio content to my app through WordPress.

When I attempt to use the <audio> tag, I encounter an error. Strangely, when I use an <iframe> instead the content is displayed without any issues.

For reference, here's the code snippet using the <audio> tag:

<audio controls autoplay>
  <source src="https://lecasablancais.com/wp-content/uploads/2024/02/comprehension-Orale-test-1-GR-–-REUSSIR-TCF-CANADA.mp3" type="audio/mp3">
</audio>

When I try to use an iframe it works:

<iframe width="300" height="100" src="https://www.example.com/your-audio-file.mp3" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

0

There are 0 best solutions below