diff --git a/public/css/main.css b/public/css/main.css index d4b3f6c..c133a42 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -452,6 +452,15 @@ h4 { /* Maintain aspect ratio without overflow */ } +/* Closed Caption styling */ +video::cue { + background-color: rgba(0, 0, 0, 0.8); + color: #fff; + font-size: 1.2em; + font-family: inherit; + padding: 0.2em 0.5em; +} + .player-overlay { position: absolute; inset: 0; diff --git a/public/js/components/VideoPlayer.js b/public/js/components/VideoPlayer.js index 5d0c063..368da3a 100644 --- a/public/js/components/VideoPlayer.js +++ b/public/js/components/VideoPlayer.js @@ -72,7 +72,11 @@ class VideoPlayer { // Faster recovery from errors levelLoadingMaxRetry: 4, manifestLoadingMaxRetry: 4, - fragLoadingMaxRetry: 6 + fragLoadingMaxRetry: 6, + // Caption/Subtitle settings + enableCEA708Captions: true, // Enable CEA-708 closed captions + enableWebVTT: true, // Enable WebVTT subtitles + renderTextTracksNatively: true // Use native browser rendering for text tracks }; }