From 8d741fa0162935a58cda338a87051352a8c5fccb Mon Sep 17 00:00:00 2001 From: Lucas Fialho Zawacki Date: Thu, 1 Feb 2024 16:40:27 -0300 Subject: [PATCH] fix(captions): Fix caption display --- .../imports/ui/components/audio/captions/service.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/service.js b/bigbluebutton-html5/imports/ui/components/audio/captions/service.js index 2a85ba5b36..008852006b 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/service.js +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/service.js @@ -4,7 +4,7 @@ import Auth from '/imports/ui/services/auth'; const CAPTIONS_CONFIG = Meteor.settings.public.captions; const CAPTIONS_ALWAYS_VISIBLE = Meteor.settings.public.app.audioCaptions.alwaysVisible; const CHARACTERS_PER_LINE = CAPTIONS_CONFIG.lineLimit; -const LINES_PER_MESSAGE = CAPTIONS_CONFIG.line; +const LINES_PER_MESSAGE = CAPTIONS_CONFIG.lines; const CAPTION_TIME = CAPTIONS_CONFIG.time; const CAPTION_LIMIT = CAPTIONS_CONFIG.captionLimit; @@ -29,7 +29,9 @@ function splitTranscript(obj) { } } - transcripts.push(result) + if (result.length) { + transcripts.push(result) + } transcripts.push(currentLine.trim()) return transcripts.map((t) => { return { ...obj, transcript: t} });