Commit 5bbf41a0 authored by mgabdev's avatar mgabdev

TESTING gifs

parent 10fce962
......@@ -57,6 +57,13 @@ class Item extends React.PureComponent {
// }
}
handleLoadedMetaData = (e) => {
console.log("handleLoadedMetaData:", e, this.hoverToPlay());
// if (!this.hoverToPlay()) {
// e.target.play();
// }
}
hoverToPlay () {
const { attachment } = this.props;
return autoPlayGif === false && attachment.get('type') === 'gifv';
......@@ -194,6 +201,7 @@ class Item extends React.PureComponent {
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
onLoadedData={this.handleLoadedData}
onLoadedMetaData={this.handleLoadedMetaData}
autoPlay={autoPlay}
type='video/mp4'
loop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment