Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5368 from matrix-org/hs/fix-video-bug
Browse files Browse the repository at this point in the history
Fix videos not playing in non-encrypted rooms
  • Loading branch information
Half-Shot authored Oct 30, 2020
2 parents d102347 + c848541 commit 428a2de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/views/messages/MVideoBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
}

async _videoOnPlay() {
const autoplay = SettingsStore.getValue("autoplayGifsAndVideos") as boolean;
if (autoplay || this.state.decryptedUrl || this.state.fetchingData || this.state.error) {
// The video has or will have the data.
if (this._getContentUrl() || this.state.fetchingData || this.state.error) {
// We have the file, we are fetching the file, or there is an error.
return;
}
this.setState({
Expand All @@ -164,6 +163,7 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
this.setState({
decryptedUrl: contentUrl,
decryptedBlob: decryptedBlob,
fetchingData: false,
});
this.props.onHeightChanged();
}
Expand Down

0 comments on commit 428a2de

Please sign in to comment.