Merge pull request #1074 from Stremio/fix/player-slider-thumb-movement

Player: Fix Slider thumb movement
This commit is contained in:
Timothy Z. 2025-11-27 17:26:09 +02:00 committed by GitHub
commit 135ca80bd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,11 +142,11 @@ const Slider = ({ className, value, buffered, minimumValue, maximumValue, disabl
<div className={styles['layer']}>
<div
className={classnames(styles['track-after'], { [styles['audio-boost']]: audioBoost })}
style={{ '--mask-width': `calc(${thumbPosition} * 100%)` }}
style={{ '--mask-width': `calc(${thumbPosition.toFixed(3)} * 100%)` }}
/>
</div>
<div className={styles['layer']}>
<div className={styles['thumb']} style={{ marginLeft: `calc(100% * ${thumbPosition})` }} />
<div className={styles['thumb']} style={{ marginLeft: `calc(100% * ${thumbPosition.toFixed(3)})` }} />
</div>
</div>
);