[SOLVED] iOS Videtexture Zoom

Hello I am currently working on an AR application in PlayCanvas which also needs to run on iOS. I am also using videotextures to display a video with AR (a character holding up a video). Now once I load the video, the Camera on iOS devices zooms in for some reason. I had this with another project as well and couldn’t fix it. On the Tablet it’s not very significant, but on IPhones the zoom is really significant.

I had this problem before, but then it could be ignored because it wasn’t that bad, but with my new application it is…

Has anyone got an idea why this happens?

(Also I hate iOS with videos on websites… their stupid policy of every video and audio needing immediate input of the user in order to play is really frustrating…)

These are the video Attributes I set:

video.setAttribute("id", this.elementID);
video.setAttribute('muted', '');
video.setAttribute("type", "video/mp4");
video.setAttribute("style", "visibility: hidden");
video.setAttribute("preload", "auto");
video.setAttribute('playsinline', '');
video.setAttribute('crossOrigin', "anonymous");

What do you mean by in? Is the video texture being cropped?

Edit: oh the camera. Hmm… that’s rather odd. Is the FOV of the camera being changed? Does this happen in non AR? Or in non AR with the camera fees in the background?

I wrote a script which outputs the FOV, the posiition and the local position of the AR camera. The values all remain unchanged. Also it seems like the camera zooms in after the video element is added to the document


I set the attribute visibility to be hidden, so it should not take up any space… But it seems, that the video element is taking up space, and somehow is making the View zoom in…

EDIT: Oh and it also happens when AR is turned off.

I wonder if the page is getting zoomed in when the video DOM is added to the page :thinking:

It would seem like it yes. Is somebody else experiencing this problem ?

If anyone every gets that problem again… I set the height and width attribute of the DOM element which is created to 1px. This way the “zoomIn” effect is hardly noticable.

1 Like