Custom Mute Button for Audio Embedding?

前端 未结 2 1922
小鲜肉
小鲜肉 2021-01-21 16:08

I\'m trying to set up a custom mute button for the embed tag.


2条回答
  •  旧时难觅i
    2021-01-21 16:18

    This is obviously an old question, but I had a similar issue... probably not the best solution, but I just placed the embed in a div and removed that div on the 'mutebutton' click, then hid the mute button:

    mute
    
    
    $("#mutebutton").click(function() { $(this).hide(); var div = document.getElementById("soundDiv"); div.parentNode.removeChild(div); });

    I'm still a noob, so this may not work for you. But it did for me!

提交回复
热议问题