Skip to content
Snippets Groups Projects
Commit 784c7510 authored by unarist's avatar unarist Committed by Eugen Rochko
Browse files

Fix an error when video playback buffer is empty (#5300)

parent 6c54d2e5
No related branches found
No related tags found
No related merge requests found
......@@ -210,7 +210,9 @@ export default class Video extends React.PureComponent {
}
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 = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment