mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 09:21:38 +01:00
Attempt at fixing inline video player
This commit is contained in:
parent
dfa5b0576f
commit
04bedd237b
1 changed files with 5 additions and 0 deletions
|
@ -220,6 +220,11 @@ export default class Video extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate (prevProps) {
|
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) {
|
if (this.video && this.state.revealed && this.props.preventPlayback && !prevProps.preventPlayback) {
|
||||||
this.video.pause();
|
this.video.pause();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue