diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 7502dda8b5..519a2aac9f 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -209,6 +209,10 @@ export default class Video extends React.PureComponent { } } + handleProgress = () => { + this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 }); + } + handleOpenVideo = () => { this.video.pause(); this.props.onOpenVideo(this.video.currentTime); @@ -221,7 +225,7 @@ export default class Video extends React.PureComponent { render () { const { preview, src, width, height, startTime, onOpenVideo, onCloseVideo, intl, alt } = this.props; - const { progress, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; + const { progress, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; return (