0

I am having trouble getting a stream to embed with this audio tag:

<audio controls autoplay="autoplay"><source src="http://159.65.84.223:8000/stream?type=.mp3" type="audio/mp3">Your browser does not support the audio element.</audio>

should I use another code?

Thanks

koufuki77
  • 3
  • 1
  • 5

1 Answers1

1

You can find the correct audio link inside the XSPF file of your stream (open it as text file).

Try setting code as:

<audio controls autoplay="true">
<source src="http://mensajito.mx:8000/00a48ebe728b" type="audio/mp3">
</audio>

Test the example link below, and report if this gives a correct (playing) result:

https://jsfiddle.net/5s69pb34/

Some notes:

  • Your stream link is http:// and may not work if used inside some https:// website.

  • The type can be either "audio/mp3" or "audio/mpeg". Try each type if got errors.

VC.One
  • 14,790
  • 4
  • 25
  • 57
  • 1
    Be aware streams via html 5 audio can not be stopped or paused. on pause, stream audio stops, but file download continues in the background. This pauses 2 problems, 1) user's phone data is still chowed even when they think they stopped or paused the stream. 2) when user resumes, playing resumes from where they left off. – katwekibs Nov 24 '19 at 13:27