diff --git a/src/frontend/src/features/subtitle/component/Subtitles.tsx b/src/frontend/src/features/subtitle/component/Subtitles.tsx index bbc76a60..f434d98d 100644 --- a/src/frontend/src/features/subtitle/component/Subtitles.tsx +++ b/src/frontend/src/features/subtitle/component/Subtitles.tsx @@ -12,6 +12,8 @@ import { useSnapshot } from 'valtio' import { accessibilityStore, CAPTION_TEXT_SIZE_OPTIONS, + CAPTION_FONT_COLOR_VALUES, + CAPTION_BACKGROUND_COLOR_VALUES, type CaptionTextSize, } from '@/stores/accessibility' @@ -92,10 +94,14 @@ const useTranscriptionState = () => { } const Transcription = ({ row }: { row: TranscriptionRow }) => { - const { captionTextSize } = useSnapshot(accessibilityStore) + const { captionTextSize, captionFontColor, captionBackgroundColor } = + useSnapshot(accessibilityStore) const participantColor = getParticipantColor(row.participant) const participantName = getParticipantName(row.participant) const { fontSize, lineHeight } = CAPTION_FONT_SIZES[captionTextSize] + const fontColor = CAPTION_FONT_COLOR_VALUES[captionFontColor] + const backgroundColor = + CAPTION_BACKGROUND_COLOR_VALUES[captionBackgroundColor] const getDisplayText = (row: TranscriptionRow): string => { return row.segments @@ -128,9 +134,9 @@ const Transcription = ({ row }: { row: TranscriptionRow }) => { />
{participantName} @@ -138,8 +144,10 @@ const Transcription = ({ row }: { row: TranscriptionRow }) => {

{displayText}