1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-17 21:18:27 +02:00

fix: play progress time tooltip from jittering during live (#6968)

This commit is contained in:
Brandon Casey 2020-12-11 15:57:51 -05:00 committed by GitHub
parent 8476abd186
commit 799616deee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,12 @@ class TimeTooltip extends Component {
pullTooltipBy = tooltipRect.width;
}
// prevent small width fluctuations within 0.4px from
// changing the value below.
// This really helps for live to prevent the play
// progress time tooltip from jittering
pullTooltipBy = Math.round(pullTooltipBy);
this.el_.style.right = `-${pullTooltipBy}px`;
this.write(content);
}