Video.js: How do we disable ā€œcaptions settingsā€ in video.js player? Shows up in IE 11

Created on 23 Mar 2016  Ā·  15Comments  Ā·  Source: videojs/video.js

Hi-

I posted a variation of this earlier - same problem in firefox-
https://github.com/videojs/video.js/issues/2397
and I find someone else had posted this on stack overflow-

Here it is:
"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?"

http://stackoverflow.com/questions/35806897/how-do-we-disable-captions-settings-in-a-video-js-player

I am having these issues in ie 11- it was never answered by anyone.

Does anyone how to stop this from occurring? I thought it may be an ie 11 html 5 issue, but other video players do not have this problem

Thanks!
screenshot_2181

Most helpful comment

We use native captions in Safari as the browser and OS provide this functionality natively. You can always force it by setting html5: {nativeTextTracks: false}

All 15 comments

Unfortunately, we don't really have a good way of disabling it. Is there a reason why you want to hide it?

The "easiest" way to hide it is to set the textTrackSettings option to false and then add a bit of css to the page:

var player = videojs(videoEl, {
  // make the text track settings dialog not initialize
  textTrackSettings: false
});
/* hide the captions settings item from the captions menu */
.vjs-texttrack-settings {
  display: none;
}

We probably should just not add the captions settings item if the component was removed from the player.

I actually used this:
$(".vjs-texttrack-settings").css("display","none");
after making the player visible -it works great. Thanks so much.

Great, thanks.

Is this caption settings dialog only available in IE11? If so why?

Good stuff but I am not sure that answers my question. Why would I only see this on IE11 and not Chrome/FF/Safari? Is it dependent on Silverlight/Flash?

You should be seeing it on Firefox as well. Emulated tracks are used in the Flash tech or when native text tracks have issues (as is the case with some versions of IE and Firefox).

We don't have Flash but it must apply to Silverlight as well. Thanks for the info. Looks like we will have to implement a solution that is a bit more cross browser compatible for the FCC requirement and just disable this one.

@nmaves if you need the captions settings everywhere, you can always just enable the emulated text tracks everywhere. See the docs I linked above on how to do that.

@gkatsev I wished that worked. Using the following config in Chrome does not show the caption settings. From the docs it looks like I would have to fallback to the Flash version to get this to work right.

            {
                html5: {
                    nativeTextTracks: false
                },
                textTrackSettings: true,
                autoplay: true,
                controls: true
            }

I'm seeing it working: http://plnkr.co/edit/5X3zilkQ8I1N9uYP92WJ?p=preview
If it looks broken for you, can you open a new issue, filling out the issue template?
Thanks.

any idea or issue related to why "caption settings" is not displayed on safari 11.1? is there a way to force to appear?

We use native captions in Safari as the browser and OS provide this functionality natively. You can always force it by setting html5: {nativeTextTracks: false}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borm picture borm  Ā·  3Comments

askaliuk picture askaliuk  Ā·  3Comments

kocoten1992 picture kocoten1992  Ā·  4Comments

zhulduz picture zhulduz  Ā·  3Comments

dingyaguang117 picture dingyaguang117  Ā·  4Comments