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.
https://github.com/danrossi/ios-detection-utils/blob/main/src/IOSUtils.js#L30
Post
Replies
Boosts
Views
Activity
I have transient-pointer input source fully working now in WebXR in Safari. The controller connects/disconnects within a pinch. so a pinch release disconnects. So its hard to detect raycast and hover effects. selection and raycast happens on selectend event.
pseudo code. the platform detected goes between Ipad and MacIntel.
onSessionStart() {
//force play for visionOS
if (this.isIpad) {
// this.video.play();
const handlePaused = () => {
this.video.removeEventListener("pause", handlePaused);
this.video.play();
};
this.video.addEventListener("pause", handlePaused);
}
}
In the webxr session start event, forcing video/audio element playback works. Now need to detect for visionOS to do that. actually you can't detect what platform visionOS is. navigator.platform reports Ipad. So have to check if it's Ipad in WebXR and force play.
It seems to be also a problem with IOS Simulator. 17.4
I forgot to mention. in VisionOS 1.1 I get no video displaying in my VR feature and can't remote debug. Video render is black launching to WebXR. I think there its a WebGL render bug in VisionOS 1.1 but can't remote debug. And there was severe crash bugs preventing video playback launching to WebXR in 1.0. I don't know what to bug report yet and a serious run around.
It goes in a loop with "Error description not available"