Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we disable "captions settings" in a video.js player?

Tags:

html

video.js

I am using video.js 5.7.1 on a single video player within a web page. The video element contains a "captions" track element. When the user clicks the CC button in IE 11, they see a menu containing the following:

  • captions settings
  • captions off
  • english

I would like to completely remove the first menu item "captions settings" so that the menu only shows "captions off" and "english".

I'm sure it's something simple, but I can't seem to find how to disable/remove the "captions settings" menu item. What needs to happen to remove this option from the CC button on the player?

For now, I'm setting the track kind to "subtitles" instead of "captions", to avoid the settings menus entirely.

like image 703
kgcode Avatar asked Dec 31 '25 06:12

kgcode


1 Answers

What I ended up doing was adding the following CSS after the video.js CSS:

/* Prevent CC settings menu item from displaying */
.vjs-texttrack-settings {
  display: none;
}

This accomplished what I needed; the captions settings menu item no longer appears on the CC menu. This works in 5.7.1 and 5.8.8.

like image 138
kgcode Avatar answered Jan 01 '26 22:01

kgcode



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!