From 5691d5e4592ffdf712fc830547691f464fed031a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Wed, 28 Jun 2023 21:39:23 +0200 Subject: [PATCH] fix(WebVTT): Add support to middle position (#5366) This setting is used in https://devstreaming-cdn.apple.com/videos/streaming/examples/adv_dv_atmos/main.m3u8 (Apple HLS example) --- 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]) {