2

I'm using Django to point to the mp3 files in the media folder like this:

<audio controls autoplay preload=auto controlsList="nodownload" id="audioPlayer">
  <source src="../media/{{ article.sound }}" type="audio/mpeg">
            Your browser does not support the audio element.
</audio>

I have no issue in the web browser, but when I use Safari on my iPhone it shows "live broadcast" instead of the standard interface with timeline. The same question was asked 8 years ago, but I don't understand how I should solve the problem. Also, 8 years is a long time in this context.

HTML5 <audio> Safari live broadcast vs not

Panto
  • 104
  • 1
  • 1
  • 9
  • Did you find the solution? I'm still stuck. Thanks. – Ryan Feb 17 '19 at 21:04
  • 1
    @Ryan Yes, I solved it by changing the file format. I don't remember the details, but I see that I ended up using "type="audio/wav"" in my code. Make then sure your audio is a .wav file. It's probably another solution, but this was sufficient for me. – Panto Feb 19 '19 at 07:05
  • Thanks for following up. I want to use mp3 ideally (or *maybe* m4a) but definitely not wav for my purposes. So I'll continue trying to figure it out at https://stackoverflow.com/q/54738875/470749 – Ryan Feb 19 '19 at 15:35

0 Answers0