Forum Discussion

BabulalShelar's avatar
BabulalShelar
Community Member
21 hours ago

CC Text Adjustment in Modern Player

Hi Team,

A code snippet to adjust closed caption text in Storyline:

 

var player = GetPlayer();

var style = document.createElement('style');
style.innerHTML = `
  .caption-text {
    max-width: 90vw !important;  
    padding: 10px 20px !important;
    box-sizing: border-box;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
`;
document.head.appendChild(style);

 

This works in the Classic Player. In the Modern Player, if we modify and use, it only works when the screen is adjusted to 100% zoom.

Could you please advise if there’s a supported way to adjust CC text styling in the Modern Player that works across all screen sizes, or an updated approach/code for this?

Thank you!

No RepliesBe the first to reply