Add SRT subtitle support and improve subtitle handling
This update enables SRT subtitle files by converting them to VTT blob URLs, sets the default subtitle track automatically, and improves subtitle track switching. Subtitle styling is enhanced in CSS, and tests are updated to use the correct subtitle prop format.
This commit is contained in:
@@ -24,3 +24,25 @@
|
||||
.video-element::-webkit-media-controls-panel {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Subtitle styling */
|
||||
.video-element::cue {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
font-size: 1.2em;
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.4;
|
||||
padding: 0.2em 0.5em;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
/* Ensure text tracks are visible */
|
||||
.video-element::-webkit-media-text-track-container {
|
||||
overflow: visible !important;
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
||||
.video-element::-webkit-media-text-track-display {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user