Thiyan Arumugam
Thiyan Arumugam

Reputation: 109

How can I play a online radio in html

The given URL for the radio is https://karthigaifm.radioca.st/streams/64kbps

Stream type is Shoutcast Port is 12000

I tried with this code, but it is not working.

<audio preload="none" autoplay="autoplay" controls="controls">
       <source
           src="https://karthigaifm.radioca.st/streams/64kbps;"
       />
</audio>

Upvotes: 1

Views: 4465

Answers (1)

Marius
Marius

Reputation: 1679

You need to remove the semicolon at the end of the src string. Like so:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Audio Test</title>
  </head>
  <body>
    <audio preload="none" autoplay="autoplay" controls="controls" src="https://karthigaifm.radioca.st/streams/64kbps" />
  </body>
</html>

Upvotes: 2

Related Questions