TESTING gifs
This commit is contained in:
parent
10fce962c8
commit
5bbf41a0bc
@ -57,6 +57,13 @@ class Item extends React.PureComponent {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleLoadedMetaData = (e) => {
|
||||||
|
console.log("handleLoadedMetaData:", e, this.hoverToPlay());
|
||||||
|
// if (!this.hoverToPlay()) {
|
||||||
|
// e.target.play();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
hoverToPlay () {
|
hoverToPlay () {
|
||||||
const { attachment } = this.props;
|
const { attachment } = this.props;
|
||||||
return autoPlayGif === false && attachment.get('type') === 'gifv';
|
return autoPlayGif === false && attachment.get('type') === 'gifv';
|
||||||
@ -194,6 +201,7 @@ class Item extends React.PureComponent {
|
|||||||
onMouseEnter={this.handleMouseEnter}
|
onMouseEnter={this.handleMouseEnter}
|
||||||
onMouseLeave={this.handleMouseLeave}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
onLoadedData={this.handleLoadedData}
|
onLoadedData={this.handleLoadedData}
|
||||||
|
onLoadedMetaData={this.handleLoadedMetaData}
|
||||||
autoPlay={autoPlay}
|
autoPlay={autoPlay}
|
||||||
type='video/mp4'
|
type='video/mp4'
|
||||||
loop
|
loop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user