Skip to main content

I can’t seem to figure out how to have a video start playing that has a text track without the text track displaying by default. Is there a way to have the video start playing without the captions turned on?

Hello @Will Findlay,

 

Thank you for your question regarding hiding the captions button by default when a player has text tracks representing captions.  I believe the player option you are looking for is documented as multilingual_metadata_tracks_disabled the description for which appears here: https://player.support.brightcove.com/references/player-configuration-guide.html#multilingual_metadata_tracks_disabled

This leads me to a question of my own.  How to turn them back on and what impact will this have on accessibility requirements.

Please let me know if this addresses your initial question!

 

Thanks,

Michael


This is helpful, but I admit, I don’t have a lot of experience using parameters like this to change a player. I wish this was just a player setting. Do you know how I would use this documentation to modify a player?


No problem! You can make this change within Video Cloud Studio (a.k.a. Marketing Studio/Comm Studio, etc.). Login to your Brightcove account. Visit the Players tab.  Click on the Player you want to add this configuration change to.  Click the JSON config button to view the JSON Editor code block where we will add the value.  The process is explained in the Viewing Player Configuration Documentation.

 

You will make the change in the editor as follows, Scroll to the bottom of the JSON editor where you should see the last few lines as so:

,

  "fullscreen_control": true,

  "picture_in_picture_control": true,

  "volume_orientation": "horizontal"

}

You will add a comma and a new line after “volume_orientation”:”horizontal” and add the new setting

,

  "fullscreen_control": true,

  "picture_in_picture_control": true,

  "volume_orientation": "horizontal",

  “multilingual_metadata_tracks_disabled”: true

}

You will then need to click “Save” and publish the player. As with all publishing player activities it can take a few minutes for the change to propagate to the web player itself.  You can confirm the change by visiting the url for the player configuration using the URL format:

https://players.brightcove.net/{ACCOUNT_ID}/{PLAYER_ID}_default/config.json

Where {ACCOUNT_ID} is your Brightcove Acount ID for your video cloud account and {PLAYER_ID} is the ID of the player you wish to view.  You can also just grab the player publish URL and change ‘index.html’ to ‘config.json’ 


If you make a mistake or syntax error you should see a red “x” on the line in question and have the opportunity to fix it before saving.  The most common error is forgetting the comma at the end of the preceding line or not putting the configuration value in quotes.

Once you reload the player in the web browser, the captions button should no longer appear by default.

Hope that helps!

Cheers,

Michael


Thanks so much for spelling this out for me!

Ok, so I tried this. I successfully edited and published the player, but when I play a video using the player, the captions still display from the start. Here is an example video that should not be showing captions until the user turns them on, because it is using the edited player:

 


I just took a look at the player and while I see the setting in the config file, I might have instructed you to put it in the proper place.  I believe this as when I look at the player settings from the command line in the developer’s console, that value isn’t present.  I will work through determining the proper placement in one of my own players and get back to you!


Apparently I mis-understood the functionality of that feature flag.  Unfortunately multilingual_metadata_tracks_disabled only has an effect when multilingual metadata is used. if that's not true and the video has any non-primary language metadata, then the player will try to enable a text track matching the player language.

Aside from that, there is a delivery config setting (per account) which is enabled by default but can't be disabled, which sets DEFAULT="YES" on the first subtitles rendition in the HLS manifest. That is what makes the player enable it by default.  

I found this sample, which does the opposite. It sets the player caption language to the same language specified in the browser: https://player.support.brightcove.com/code-samples/brightcove-player-sample-automatically-set-caption-language.html

But it includes code that appears to set the tracks mode to “showing” or “disabled”.  Not sure if this could be a way to turn of the captions in-page?

 


Reply