Detect visionOS to not include deviceorientation. Comes up as Ipad

I was wondering if anyone has managed to figure out a way to properly detect visionOS to not include device orientation controls when going fullscreen. It comes up as detecting as Ipad and so has ipad functions it cant do. Its asking for orientation permissions it doesn’t need also.

I’m not sure why they did that other than making life hard for developers I already had to spend days trying to fix my picture in picture hacks and Iphone fullscreen hack as they decided to break. desktop safari now needed the canvas video added to dom to get pip working and and now a 100ms delay was needed to get Iphone fullscreen working.

I figured something out but I presume this may need rectifying in the future. Differentiate Ipad from visionOS using screen dimensions. Ipad is less. I can now have my feature not trying to turn on mobile device orientation controls going fullscreen thinking it’s an Ipad / mobile device. Html Fullscreen in visionOS is contained to the browser view until XR immersive mode so orientation won’t work.

I’m sad so many traps are put in place and makes it very difficult to pull features off for anything Apple. Prob spent a solid week fixing Apple device feature hacks for WebGL canvas render and now this problem.

They did that platform detection thing on purpose so short sighted. XR can’t be used as a feature detection as it’s disabled by default and in a webkit ticket said it was intentional to be disabled haha.

I just integrated and the Ipad availWidth changed. So back to square one. I have zero faith in the intelligence of Apple.

tweaking the width and adding height checks seems to work. updated.