Forum Discussion
Nedim
9 days agoCommunity Member
Hide Volume Button in Video Controls
How can I hide the volume button in the video controls?
Try this:
document.querySelectorAll('.video-volume').forEach(volume => { volume.style.display = 'none'; });
- NedimCommunity Member
To hide the volume button in the video controls execute the following JavaScript when the timeline starts:
document.querySelector('.video-volume').style.display = 'none';
- MichaelGallagheCommunity Member
Thanks Nedim! That works. I have two videos on the screen and it only works on the first video. Can you tell me what I need to do to have both videos hide the "Volume" button.
- NedimCommunity Member
Try this:
document.querySelectorAll('.video-volume').forEach(volume => { volume.style.display = 'none'; });
- MichaelGallagheCommunity Member
That worked perfectly! Thank you so much.