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

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
unarist 2017-10-10 22:17:53 +09:00 committed by Eugen Rochko
parent 6c54d2e583
commit 784c7510d7
1 changed files with 3 additions and 1 deletions

View File

@ -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 = () => {