在html中使用<audio>时,我可以在播放器中添加下载链接吗?

问题描述 投票:0回答:2

我想在我的网站页面上添加一个 html5 音频播放器,但我希望人们也能够下载该曲目。 显然我可以在附近添加一个链接,但我想在播放器本身中有一个按钮。这可能吗?我还没有看到任何具有此功能的示例。

html audio download embed
2个回答
0
投票
<audio controls="controls" controls="download">
 <a href="audio.mp3" download>
  <source src="audio.mp3" type="audio/mpeg">
 </a>
</audio>

-1
投票
<audio controls="controls" controls="download"> <br>
  <source src="horse.ogg" type="audio/ogg" />
<source src="horse.mp3" type="audio/mp3" /><br>
</audio>
<a href="http://music.com/music.mp3">Download audio </a>
© www.soinside.com 2019 - 2024. All rights reserved.