简体   繁体   中英

Detect if HTML5 video volume property is read-only?

I have a mute button that sets my video volume to 0:

video.volume = 0;

If this isn't supported I'd like to hide the mute button. I can use user-agent detection, but that is less than ideal. Does anyone know of a way to check if this property is read-only?

Thanks,

Tim

to mute use .muted . The old volume will be remembered and it works everywhere.

video.muted = true;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM