Attempt at fixing inline video player

th-downstream
Thibaut Girka 6 years ago committed by ThibG
parent 9614abc713
commit 3d8c1f6104

@ -220,6 +220,11 @@ export default class Video extends React.PureComponent {
}
componentDidUpdate (prevProps) {
if (this.player && this.player.offsetWidth && !this.state.fullscreen) {
this.setState({
containerWidth: this.player.offsetWidth,
});
}
if (this.video && this.state.revealed && this.props.preventPlayback && !prevProps.preventPlayback) {
this.video.pause();
}

Loading…
Cancel
Save