Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off volume control and mute button in HTML5 video

We have some videos playing great in our HTML mobile app. However, our videos don't have sound, just subtitles, so we need to remove the volume slider and mute button but keep the timer bar.

Can this be done or toggled with HTML or CSS? Or is some javascript required to do this?

At the moment the setting within our html tag is just: controls="controls"

like image 589
me9867 Avatar asked Dec 14 '22 07:12

me9867


1 Answers

This has worked:

video::-webkit-media-controls-volume-slider {
display:none;
}

video::-webkit-media-controls-mute-button {
display:none;
}
like image 175
me9867 Avatar answered Dec 28 '22 07:12

me9867