diff --git a/materialious/src/lib/components/player/ClosedCaptions.svelte b/materialious/src/lib/components/player/ClosedCaptions.svelte index 9eff9dd3..00d2fd8c 100644 --- a/materialious/src/lib/components/player/ClosedCaptions.svelte +++ b/materialious/src/lib/components/player/ClosedCaptions.svelte @@ -4,33 +4,10 @@ const captionTracks: Record = {}; - let captionFontSize: string = $state('1em'); - let captionColor: string = $state('white'); - let captionBackgroundColor: string = $state('rgba(0, 0, 0, 0.7)'); - let captionOpacity: number = $state(1); - - export function setTextTrackVisibility(visible: boolean = true) { + export function setTextTrackVisibility(visible: boolean) { trackVisible = visible; } - // Function to update caption style settings - export function updateCaptionStyles({ - fontSize, - color, - backgroundColor, - opacity - }: { - fontSize?: string; - color?: string; - backgroundColor?: string; - opacity?: number; - }) { - if (fontSize) captionFontSize = fontSize; - if (color) captionColor = color; - if (backgroundColor) captionBackgroundColor = backgroundColor; - if (opacity !== undefined) captionOpacity = opacity; - } - // Fetch caption data for a selected language export async function selectTextTrack(language: string) { const resp = await fetch(captionTracks[language], { method: 'GET' }); @@ -48,8 +25,7 @@