From ded6420c1ab5a7a80402a7ac30b7bfc08c5b8722 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 27 Jan 2023 17:51:31 +0800 Subject: [PATCH] Fallback if browser doesn't autoplay --- src/components/status.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/status.jsx b/src/components/status.jsx index 339a9b2d..0ed8569b 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -785,6 +785,11 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) { ${isGIF ? '' : 'controls'} playsinline loop="${loopable}" + ${ + isGIF + ? 'ondblclick="this.paused ? this.play() : this.pause()"' + : '' + } > `, }}