javascript – Mixed content for audio file-ThrowExceptions

Exception or error:

I have an mp3 file that I play using the audio source html tag like the following:

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

The problem is that the site is under https but the actual mp3 files are not (and for now they cannot be put under https). Because of that I get the following error:

Mixed Content: The page at ‘‘ was loaded over HTTPS, but requested an insecure element http://horse.mp3

How can I make sure that I can play those mp3 files without them being under https?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *