diff options
author | ThibG <thib@sitedethib.com> | 2019-06-26 19:33:04 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-06-26 23:19:26 +0200 |
commit | 4175f131557f3633d38e78692698469c3652e398 (patch) | |
tree | eb3844f56783fe8b7a5ca6f45c424eee4ec406df /app/javascript/flavours/glitch/features/video | |
parent | 383136d9bb290ebca7d8414b151c14d6038d5bc3 (diff) |
[Glitch] Add option to disable blurhash previews
Port 3086c645fde2345d34e401bdf3e2f19f19da3294 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/features/video')
-rw-r--r-- | app/javascript/flavours/glitch/features/video/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index b73ea0b07..112f9d101 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -5,7 +5,7 @@ import { fromJS, is } from 'immutable'; import { throttle } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen'; -import { displayMedia } from 'flavours/glitch/util/initial_state'; +import { displayMedia, useBlurhash } from 'flavours/glitch/util/initial_state'; import { decode } from 'blurhash'; const messages = defineMessages({ @@ -312,7 +312,7 @@ export default class Video extends React.PureComponent { } _decode () { - if (!this.canvas) return; + if (!this.canvas || !useBlurhash) return; const hash = this.props.blurhash; const pixels = decode(hash, 32, 32); |