|
|
@ -166,6 +166,10 @@ export default class Video extends React.PureComponent { |
|
|
|
|
|
|
|
|
|
|
|
setCanvasRef = c => { |
|
|
|
setCanvasRef = c => { |
|
|
|
this.canvas = c; |
|
|
|
this.canvas = c; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c && this.props.blurhash) { |
|
|
|
|
|
|
|
this._decode(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleMouseDownRoot = e => { |
|
|
|
handleMouseDownRoot = e => { |
|
|
@ -310,6 +314,8 @@ export default class Video extends React.PureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_decode () { |
|
|
|
_decode () { |
|
|
|
|
|
|
|
if (!this.canvas) return; |
|
|
|
|
|
|
|
|
|
|
|
const hash = this.props.blurhash; |
|
|
|
const hash = this.props.blurhash; |
|
|
|
const pixels = decode(hash, 32, 32); |
|
|
|
const pixels = decode(hash, 32, 32); |
|
|
|
|
|
|
|
|
|
|
|