From b3f664aaf5363db747762e1a64fa0f13453c4c4a Mon Sep 17 00:00:00 2001 From: Alvaro Velad Galvan Date: Wed, 28 Jun 2023 10:47:52 +0200 Subject: [PATCH] fix(WebVTT): Add support to middle position --- lib/text/vtt_text_parser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/text/vtt_text_parser.js b/lib/text/vtt_text_parser.js index 6e417e0742..445b7c162b 100644 --- a/lib/text/vtt_text_parser.js +++ b/lib/text/vtt_text_parser.js @@ -783,7 +783,8 @@ shaka.text.VttTextParser = class { } else if ((results = /^size:([\d.]+)%$/.exec(word))) { cue.size = Number(results[1]); } else if ((results = - /^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/ + // eslint-disable-next-line max-len + /^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/ .exec(word))) { cue.position = Number(results[1]); if (results[2]) {