feat(vap播放组件): 修复苹果端走原生video播放的问题

This commit is contained in:
hzj 2026-05-02 13:22:09 +08:00
parent eb5f731bbf
commit 928fcb261b

View File

@ -121,17 +121,17 @@ function enforceVideoPlaybackAttributes(video, shouldMute) {
video.disableRemotePlayback = true video.disableRemotePlayback = true
} }
// Keep the source video alive for canvas sampling without letting Safari // Hide the source video completely so iOS does not surface the raw mp4
// promote it into the native fullscreen player. // in the native fullscreen player instead of keeping the VAP in-canvas.
video.style.display = 'block' video.style.display = 'none'
video.style.position = 'fixed' video.style.position = ''
video.style.left = '-9999px' video.style.left = ''
video.style.top = '0' video.style.top = ''
video.style.width = '1px' video.style.width = ''
video.style.height = '1px' video.style.height = ''
video.style.opacity = '0' video.style.opacity = ''
video.style.pointerEvents = 'none' video.style.pointerEvents = 'none'
video.style.zIndex = '-1' video.style.zIndex = ''
if (shouldMute) { if (shouldMute) {
video.muted = true video.muted = true