Hi,
I have sphere object with multiple video textures on autoplay. All browsers work including Safari mobile (even on my iPhone 7) only on Mac OSX Safari (tested on latest version) the video’s don’t always play or they freeze on the last frame after the first play and then start playing again after a few seconds.
I tried some other three js video texture demo’s and they all do work smootly. So I guess I’m doing something wrong but really can’t seem to figure out what.
EDIT: Was thinking about this issue again and could it be a loading/caching issue? I kind of feel like the video’s begin loading when I’m already on the website a few seconds. I also feel like the video’s arn’t being cached which might cause the freeze as the video needs to download again.
The code I’m using for loading the videos:
video.setAttribute('playsinline', 'playsinline')
video.src = 'videos-compressed/${obj.video}'
video.muted = true
video.crossOrigin = 'anonymous'
video.id = obj.video
video.loop = true
video.style.display = 'none'
video.load()
video.play()
const texture = new THREE.VideoTexture(video)
texture.minFilter = THREE.LinearFilter
texture.magFilter = THREE.LinearFilter
texture.format = THREE.RGBFormat
texture.flipY = false
child.material.map = texture
child.material.needsUpdate = true
I’ve tried looking for a solution everywhere but couldn’t find anything. Any help would be really appreciated!
Thanks,
PJ