From 07e86dee9da3a3cbe11e286dca8d5b821562aade Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 19 Oct 2023 16:38:00 -0400 Subject: [PATCH] Use LTR for default subtitle direction --- src/plugins/htmlVideoPlayer/plugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 5f20eb116..41f0528d5 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -143,7 +143,9 @@ function normalizeTrackEventText(text, useHtml) { const result = text .replace(/\\N/gi, '\n') // Correct newline characters .replace(/\r/gi, '') // Remove carriage return characters - .replace(/{\\.*?}/gi, ''); // Remove ass/ssa tags + .replace(/{\\.*?}/gi, '') // Remove ass/ssa tags + // Force LTR as the default direction + .split('\n').map(val => `\u200E${val}`).join('\n'); return useHtml ? result.replace(/\n/gi, '
') : result; }