How how do I link live Shoutcast broadcast to website?

1k Views Asked by At

I am new to coding and am trying to set up a streaming audio option so that visitors may listen to a weekly live broadcast directly from a website but most browsers are blocking it from running.

The live stream is coming from Shoutcast as an HTTP:// not an HTTPS:// which is causing an insecure mixed content issue.

The stream works fine on Firefox on the live site, but will not work on any other browser tested.

I do get the console message on Chrome that it was automatically upgraded to HTTPS://, and from what I understand I should just have to change my code to HTTPS:// for it to work, but it is not, and I could be wrong.

Here is my original code:

  <audio
      controls
      src="http://djefo.lightmanstreams.com:8020/;"
      type="audio/mpeg"
   ></audio>

Are there any suggestions on how I can make the stream work on Chrome at least?

2

There are 2 best solutions below

2
Real Dewan On

Well, unless you upgrade your shoutcast streaming package, you will not be able to use https to avoid mixed content issue. From my experience of shoucast/icecast streaming, I can say you have to upgrade your package to the certain package which provides SSL for your streaming URL.

0
Alex Paramonov On

Two options:

  1. Latest Shoutcast version (2.6.1 build 777: https://yp.shoutcast.com/v/2_6_1) does support SSL out of the box on Linux, so you can get a free SSL certificate from Letsencrypt and use it with Shoutcast.
  2. You can configure Apache or Nginx as SSL proxy for your non-ssl SHoutcast stream, see this answer: Web radio stream proxying