1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-06 06:50:51 +02:00

fix: Seek to 0 if attempt is made to seek to negative value (#4799)

Fixes #4501
This commit is contained in:
Charlie Ryan 2017-12-11 13:25:41 -08:00 committed by Gary Katsevman
parent e187585748
commit 1a588f71cf

View File

@ -1789,6 +1789,9 @@ class Player extends Component {
*/
currentTime(seconds) {
if (typeof seconds !== 'undefined') {
if (seconds < 0) {
seconds = 0;
}
this.techCall_('setCurrentTime', seconds);
return;
}