1. UI
  2. Mute Button

UI

Mute Button

This component is used to mute and unmute media.

Import

js
        import '@vidstack/player/define/vds-mute-button.js';

      
cdn
        <script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@vidstack/player@next/cdn/define/vds-mute-button.js"
></script>

      

Usage

The <vds-mute-button> component will toggle the muted state of media as it's pressed by dispatching a vds-mute-request, and vds-unmute-request event to the media controller.

          
        

Styling

Here's a simple styled <vds-mute-button> example containing a mute and unmute icon: