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

fix: slider screenreader value returning as NaN (#6404)

Slider's getProgress was return a string when it should've been returning a number.

Fixes #5984.
This commit is contained in:
Brandon Casey 2020-01-15 12:07:45 -05:00 committed by Gary Katsevman
parent bcaa86989b
commit 7008777985

View File

@ -244,7 +244,7 @@ class Slider extends Component {
const progress = this.getProgress();
if (progress === this.progress_) {
return;
return progress;
}
this.progress_ = progress;
@ -268,7 +268,7 @@ class Slider extends Component {
* percentage filled that the slider is
*/
getProgress() {
return clamp(this.getPercent(), 0, 1).toFixed(4);
return Number(clamp(this.getPercent(), 0, 1).toFixed(4));
}
/**