From 32164375de606a01af32c9b0a43d3537dbcc136a Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 19 Jan 2024 18:57:35 +0100 Subject: [PATCH] fix: subtitles line breaks --- src/withHTMLSubtitles/withHTMLSubtitles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/withHTMLSubtitles/withHTMLSubtitles.js b/src/withHTMLSubtitles/withHTMLSubtitles.js index 4bdcaf1..ab2093d 100644 --- a/src/withHTMLSubtitles/withHTMLSubtitles.js +++ b/src/withHTMLSubtitles/withHTMLSubtitles.js @@ -77,6 +77,7 @@ function withHTMLSubtitles(Video) { subtitlesRenderer.render(cuesByTime, videoState.time + delay).forEach(function(cueNode) { cueNode.style.display = 'inline-block'; cueNode.style.padding = '0.2em'; + cueNode.style.whiteSpace = 'pre-wrap'; cueNode.style.fontSize = Math.floor(size / 25) + 'vmin'; cueNode.style.color = textColor; cueNode.style.backgroundColor = backgroundColor;