html - 如何在 html 中播放在线电台
问题描述
收音机的给定 URL 是https://karthigaifm.radioca.st/streams/64kbps
流类型是 Shoutcast 端口是 12000
我尝试使用此代码,但它不起作用。
<audio preload="none" autoplay="autoplay" controls="controls">
<source
src="https://karthigaifm.radioca.st/streams/64kbps;"
/>
</audio>
解决方案
src
您需要删除字符串末尾的分号。像这样:
<!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>
推荐阅读
- swift - 来自 UIPickerView 的索引行 didSelectRow 选择
- r - 用 case_when 在 R 中查看列名末尾的数字大于另一个列名末尾的数字
- swift - Swift UI - 如何制作图像网格?
- javascript - 如何在 JavaScript 中为 CSS 属性动态使用函数参数
- html - html代码中的Radio类型和复选框类型有什么区别?
- javascript - JSX 上下文何时开始?
- angular - NRWL NX 导入库错误 TS2307:找不到模块“@eduboard/interfaces”
- kubernetes - 如何在 gitlab ci 中修复 k8s 命名空间权限
- javascript - 我将如何通过网络应用程序编译代码?
- java - 对固定长度的字符串进行排序