Reputation: 141
I'm trying to get a video texture to play on geometry in iOS using three.js but instead of playing the video as a texture, the browser launches the video in a player that covers the window. I have tried this loading the mp4 directly in the texture, loading it first through a canvas, etc. If I pause the video with the player's controls, and "pinch", the player goes away leaving a paused texture on the geo at the paused frame.
Examples on line such as: http://jeromeetienne.github.io/threex.videotexture/examples/videotexture.html exhibit the same issue. So I'm assuming this is a new "feature" in iOS.
Is this an iOS issue, a Safari issue? If anyone has a workaround I would appreciate it. thanks
Upvotes: 6
Views: 2554
Reputation: 781
I fixed this issue by setting the 'playsinline' attribute on the video element. There is also a polyfill: https://www.npmjs.com/package/iphone-inline-video
Upvotes: 1
Reputation: 141
found a link from an iOS post that led to an Apple page. Small screen iOS devices play back video at full screen - apparently overriding whatever instructions there may be in the HTML
Upvotes: 0