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) => {
|
handleLoadedMetaData = (e) => {
|
||||||
console.log("handleLoadedMetaData:", e, this.hoverToPlay());
|
if (!this.hoverToPlay()) {
|
||||||
// if (!this.hoverToPlay()) {
|
e.target.play();
|
||||||
// e.target.play();
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverToPlay () {
|
hoverToPlay () {
|
||||||
@ -200,7 +192,6 @@ class Item extends React.PureComponent {
|
|||||||
onClick={this.handleClick}
|
onClick={this.handleClick}
|
||||||
onMouseEnter={this.handleMouseEnter}
|
onMouseEnter={this.handleMouseEnter}
|
||||||
onMouseLeave={this.handleMouseLeave}
|
onMouseLeave={this.handleMouseLeave}
|
||||||
onLoadedData={this.handleLoadedData}
|
|
||||||
onLoadedMetadata={this.handleLoadedMetaData}
|
onLoadedMetadata={this.handleLoadedMetaData}
|
||||||
autoPlay={autoPlay}
|
autoPlay={autoPlay}
|
||||||
type='video/mp4'
|
type='video/mp4'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user