Gifs working on mobile, maybe
This commit is contained in:
parent
1a7c3a9ef9
commit
1a6afcdd2b
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user