A
A
Alexander2016-04-30 06:50:00
HTML
Alexander, 2016-04-30 06:50:00

How to set an audio stream transmitted via http to a site using SSL and avoid mixed content?

Good day, for the early I apologize for the possibly not correctly formulated question, I can’t explain otherwise.
There is an audio stream

stream.site1.ru:6004/;stream.mp3

There is a website
https://site2.ru

The following code is used to install the audio stream on the site:
<audio controls="">
<source src="http://stream.site1.ru:6004/;stream.mp3" type="audio/mpeg">
</audio>

But at the same time, in the case of playback, a warning appears in the console
mixed content

How to embed this audio stream on the site so that the mixed content warning does not appear, provided that we do not have access to stream.site1.ru?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
landergate, 2016-04-30
@QcfgAlexandr

It just won't get rid of the message. If the page is in HTTPS, then all loaded content is expected to be in HTTPS.
You can build your own proxy relay with HTTPS, receiving an audio stream through it, for example, on nginx.
Disadvantages:

  1. stream.site1.ru will see all connections of your users to the audio stream from the IP of your proxy.
  2. Theoretically, this can slightly increase the stream waiting time, but this is one of the only workarounds for lack of access to stream.site1.ru.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question