TESTING gifs
This commit is contained in:
parent
b8aede03a1
commit
ad906f0b30
@ -70,6 +70,12 @@ class Item extends React.PureComponent {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoadedData = (e) => {
|
||||||
|
if (!this.hoverToPlay()) {
|
||||||
|
e.target.play();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
if (this.props.attachment.get('blurhash')) {
|
if (this.props.attachment.get('blurhash')) {
|
||||||
this._decode();
|
this._decode();
|
||||||
@ -188,9 +194,16 @@ class Item extends React.PureComponent {
|
|||||||
<video
|
<video
|
||||||
ref={this.setVideoRef}
|
ref={this.setVideoRef}
|
||||||
className='media-gallery__item-gifv-thumbnail'
|
className='media-gallery__item-gifv-thumbnail'
|
||||||
|
aria-label={attachment.get('description')}
|
||||||
|
title={attachment.get('description')}
|
||||||
|
role='application'
|
||||||
src={gifsrc}
|
src={gifsrc}
|
||||||
type='video/mp4'
|
type='video/mp4'
|
||||||
|
autoPlay={autoPlay}
|
||||||
|
onLoadedData={this.onLoadedData}
|
||||||
preload='auto'
|
preload='auto'
|
||||||
|
loop
|
||||||
|
muted
|
||||||
playsInline
|
playsInline
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user