feat(vap播放组件): 修复苹果端走原生video播放的问题
This commit is contained in:
parent
eb5f731bbf
commit
928fcb261b
@ -121,17 +121,17 @@ function enforceVideoPlaybackAttributes(video, shouldMute) {
|
||||
video.disableRemotePlayback = true
|
||||
}
|
||||
|
||||
// Keep the source video alive for canvas sampling without letting Safari
|
||||
// promote it into the native fullscreen player.
|
||||
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'
|
||||
// Hide the source video completely so iOS does not surface the raw mp4
|
||||
// in the native fullscreen player instead of keeping the VAP in-canvas.
|
||||
video.style.display = 'none'
|
||||
video.style.position = ''
|
||||
video.style.left = ''
|
||||
video.style.top = ''
|
||||
video.style.width = ''
|
||||
video.style.height = ''
|
||||
video.style.opacity = ''
|
||||
video.style.pointerEvents = 'none'
|
||||
video.style.zIndex = '-1'
|
||||
video.style.zIndex = ''
|
||||
|
||||
if (shouldMute) {
|
||||
video.muted = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user