mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 07:11:15 +03: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={{
|
||||
backgroundColor: `rgb(${rgbAverageColor.join(',')})`,
|
||||
}}
|
||||
onClick={onClick}
|
||||
onClick={(e) => {
|
||||
if (isGIF) {
|
||||
try {
|
||||
videoRef.current?.pause();
|
||||
} catch (e) {}
|
||||
}
|
||||
onClick(e);
|
||||
}}
|
||||
onMouseEnter={() => {
|
||||
if (isGIF) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue