The Audio defaultMuted property is used for setting or returning whether the audio should be muted by default or not.
The audio defaultMuted property cannot change the current mute state, it only affects the default muted state.
- Return the deafaultMuted property:
- Set the defaultMuted property:
audioObject.defaultMuted = true|false
- true|false: It is used to specify whether an audio should automatically start playing as soon as it is loaded or not.
Below program illustrates the Audio defaultMuted Property:
Example: Setting the audio to be muted by default.
- Before clicking the button:
- After clicking the button:
Supported Browsers: The browser supported by HTML | DOM Audio defaultMuted Property are listed below:
- Google Chrome
- Apple Safari