Commit 1a6afcdd authored by mgabdev's avatar mgabdev

Gifs working on mobile, maybe

parent 1a7c3a9e
......@@ -50,18 +50,10 @@ class Item extends React.PureComponent {
}
}
handleLoadedData = (e) => {
console.log("handleLoadedData:", e, this.hoverToPlay());
// if (!this.hoverToPlay()) {
// e.target.play();
// }
}
handleLoadedMetaData = (e) => {
console.log("handleLoadedMetaData:", e, this.hoverToPlay());
// if (!this.hoverToPlay()) {
// e.target.play();
// }
if (!this.hoverToPlay()) {
e.target.play();
}
}
hoverToPlay () {
......@@ -200,7 +192,6 @@ class Item extends React.PureComponent {
onClick={this.handleClick}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
onLoadedData={this.handleLoadedData}
onLoadedMetadata={this.handleLoadedMetaData}
autoPlay={autoPlay}
type='video/mp4'
......
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