Fix an error when video playback buffer is empty (#5300)
This commit is contained in:
parent
4a45cc7566
commit
9c448a0280
1 changed files with 3 additions and 1 deletions
|
@ -210,7 +210,9 @@ export default class Video extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleProgress = () => {
|
handleProgress = () => {
|
||||||
this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
|
if (this.video.buffered.length > 0) {
|
||||||
|
this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOpenVideo = () => {
|
handleOpenVideo = () => {
|
||||||
|
|
Loading…
Reference in a new issue