Forum Discussion

Nedim's avatar
Nedim
Community Member
9 days ago
Solved

Hide Volume Button in Video Controls

How can I hide the volume button in the video controls?

  • Nedim's avatar
    Nedim
    9 days ago

    Try this:

    document.querySelectorAll('.video-volume').forEach(volume => {
        volume.style.display = 'none';
    });
    
  • Nedim's avatar
    Nedim
    Community 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'; 
    • MichaelGallaghe's avatar
      MichaelGallaghe
      Community 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.

      • Nedim's avatar
        Nedim
        Community Member

        Try this:

        document.querySelectorAll('.video-volume').forEach(volume => {
            volume.style.display = 'none';
        });