mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix an error when video playback buffer is empty (#5300)
This commit is contained in:
parent
6c54d2e583
commit
784c7510d7
@ -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 = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user