mirror of
https://github.com/videojs/video.js.git
synced 2025-04-11 11:42:08 +02:00
fix(seek-bar): ensure aria-valuenow attribute in seek-bar is not NaN (#5164)
Updated the getPercent function to return 0 instead of NaN. This is in accordance with the return value in the function's jsdocs. Fixes #4960.
This commit is contained in:
parent
d44682849e
commit
ad1bb9db5e
@ -171,7 +171,7 @@ class SeekBar extends Slider {
|
||||
getPercent() {
|
||||
const percent = this.getCurrentTime_() / this.player_.duration();
|
||||
|
||||
return percent >= 1 ? 1 : percent;
|
||||
return percent >= 1 ? 1 : (percent || 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user