Small fix for video player as the progress bar shouldn't be rtl

This commit is contained in:
Hadi Charara 2022-07-03 09:10:02 -04:00
parent 974417ce3d
commit 4530e44e62
5 changed files with 32 additions and 43 deletions

View file

@ -419,11 +419,7 @@ import { getIsRTL } from '../../scripts/globalize';
function setRange(elem, startPercent, endPercent) {
const style = elem.style;
if (getIsRTL()) {
style.right = Math.max(startPercent, 0) + '%';
} else {
style.left = Math.max(startPercent, 0) + '%';
}
style.insetInlineStart = Math.max(startPercent, 0) + '%';
const widthPercent = endPercent - startPercent;
style.width = Math.max(Math.min(widthPercent, 100), 0) + '%';