From e1b2caab8d1c416a57b453b23272038f26c9a632 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 1 May 2026 21:41:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(vap=E6=92=AD=E6=94=BE=E7=BB=84=E4=BB=B6):?= =?UTF-8?q?=20=E5=85=BC=E5=AE=B9=E8=8B=B9=E6=9E=9C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=92=AD=E6=94=BE=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VapMp4Player.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/VapMp4Player.vue b/src/components/VapMp4Player.vue index 1f493c2..1bf2c1b 100644 --- a/src/components/VapMp4Player.vue +++ b/src/components/VapMp4Player.vue @@ -101,6 +101,17 @@ function enforceVideoPlaybackAttributes(video, shouldMute) { return } + // Keep the video in the DOM and renderable for iOS autoplay policy checks. + // WebKit may still require a user gesture for videos with `display:none`. + video.style.display = 'block' + video.style.position = 'fixed' + video.style.left = '-9999px' + video.style.top = '0' + video.style.width = '1px' + video.style.height = '1px' + video.style.opacity = '0' + video.style.pointerEvents = 'none' + video.playsInline = true video.setAttribute('playsinline', '') video.setAttribute('webkit-playsinline', '')