用于音频嵌入的自定义静音按钮? [英] Custom Mute Button for Audio Embedding?
本文介绍了用于音频嵌入的自定义静音按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< embed src =intro .mp3autostart =truehidden =trueloop =false>
有没有办法通过JS做到这一点?
这适用于音频标签:
document.getElementById('audio')。muted = true;
解决方案
不,嵌入元素没有静音属性。如果你想控制音量,你需要使用音频元素或专有插件,您可以将参数传递给。
I'm trying to set up a custom mute button for the embed tag.
<embed src="intro.mp3" autostart="true" hidden="true" loop="false">
Is there a way to do this via JS?
This worked for the audio tag:
document.getElementById('audio').muted = true;
解决方案
Nope, there is no muted attribute for embed elements. If you want control over the volume you'll need to use the audio element or a proprietary plugin that you can pass parameters to.
这篇关于用于音频嵌入的自定义静音按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文