Click the button to set the video to be muted by default.
``` ### Example 2: Checking the Default Muted State You can also read the property to check if a media element is configured to load silently. ```javascript const video = document.getElementById("myVideo"); if (video.defaultMuted) { console.log("This video will load silently by default."); } else { console.log("This video will load with audio enabled by default."); } ``` --- ## Browser Support and Considerations The `defaultMuted` property is widely supported across modern browsers: * Google Chrome * Apple Safari * Mozilla Firefox * Microsoft Edge * Opera ### Important Note on Autoplay Policies Modern web browsers enforce strict autoplay policies. In most browsers (such as Chrome, Safari, and Edge), media elements are **not allowed to autoplay with sound**. If you want your video to autoplay (`autoplay="true"`), you must set either `defaultMuted` or `muted` to `true` for the browser to allow the media to start playing automatically without user interaction.Av Prop Defaultmuted
## HTML Audio/Video DOM defaultMuted Property
The `defaultMuted` property sets or returns whether an audio or video element should be muted by default when the page loads.
---
## Definition and Usage
The `defaultMuted` property is a boolean value that determines the default audio state of a media element.
* **Setting** this property only changes the default muted state of the media player (e.g., when the page is reloaded or when the media is reset). It does **not** affect the current playback volume or state.
* To change the current muted state immediately during playback, use the [`muted`](av-prop-muted.html) property instead.
---
## Syntax
### Get the defaultMuted property:
```javascript
let isDefaultMuted = mediaElement.defaultMuted;
```
### Set the defaultMuted property:
```javascript
mediaElement.defaultMuted = true | false;
```
---
## Property Values
| Value | Description |
| :--- | :--- |
| `true` | The audio/video is muted by default. |
| `false` | Default. The audio/video is not muted by default. |
---
## Technical Details
| Detail | Description |
| :--- | :--- |
| **Return Value** | A Boolean: `true` if the media is muted by default, otherwise `false`. |
| **Default Value** | `false` |
| **DOM Version** | HTML5 |
---
## Code Examples
### Example 1: Setting a Video to Mute by Default
This example demonstrates how to programmatically set a video element to be muted by default using JavaScript.
```html
YouTip