mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 08:48:47 +01:00
Another attempt to fix GIFV not auto-playing on Mobile Safari
This commit is contained in:
parent
bc4551583b
commit
9ad956049b
1 changed files with 8 additions and 1 deletions
|
@ -95,7 +95,14 @@ function Media({ media, showOriginal, onClick }) {
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `rgb(${rgbAverageColor.join(',')})`,
|
backgroundColor: `rgb(${rgbAverageColor.join(',')})`,
|
||||||
}}
|
}}
|
||||||
onClick={onClick}
|
onClick={(e) => {
|
||||||
|
if (isGIF) {
|
||||||
|
try {
|
||||||
|
videoRef.current?.pause();
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
onClick(e);
|
||||||
|
}}
|
||||||
onMouseEnter={() => {
|
onMouseEnter={() => {
|
||||||
if (isGIF) {
|
if (isGIF) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue