[英]How do I remove the download option in the HTML5 audio tag?
I am using the HTML5 audio tag on a website I'm maintaining.我在我维护的网站上使用 HTML5 音频标签。 I noticed that the audio tag has a download icon embedded in it.
我注意到音频标签中嵌入了一个下载图标。 How do I remove that option?
如何删除该选项? I want the audio to be read (playback) only.
我只想读取(播放)音频。 Is there a way to do this without JavaScript or jQuery?
有没有办法在没有 JavaScript 或 jQuery 的情况下做到这一点? I don't know either one yet.
我一个都不认识。
To remove the download option from the UI add controlsList="nodownload" attribute要从 UI 中删除下载选项,请添加 controlsList="nodownload" 属性
<audio
controls
controlsList="nodownload">
</audio>
Try this might it help you.试试这个可能对你有帮助。 It is not the best way but I think it will solve your problem.
这不是最好的方法,但我认为它可以解决您的问题。
audio::-webkit-media-controls-enclosure {
overflow:hidden;
}
audio::-webkit-media-controls-panel {
width: calc(100% + 30px); /* Adjust as needed */
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.