Experiencing the same issue here. Did you get a response from Apple or someone else?
I can make a 3D environment in the ThreeJS scene, configure xr controllers, and, when I enter VR mode on the Apple Vision Pro Simulator, I can still navigate around the scene. To add more details: with a video player in the scene, playback works fine while in the 2D window mode; but as soon as I enter VR mode the window freezes on the last rendered frame (it does not go all dark). If I rotate or navigate around, in VR mode, the rendered image is still frozen, but if I exit VR mode, the navigation applied while in VR has been executed and rendering (and playback) starts working again.
I don’t have a VR to program. However, it is reasonable for these devices to detect a scene using webGL. Pause other tabs and Media elements that are not part of the 3D scene. the solution would be to receive the video streaming and convert it to the texture outside the html media element
I’ve discovered this problem, video immediately goes to paused when launching to XR. But when I exit, I get no video playback. In Vision 1.0. In Vision 1.1 there is no webgl rendering at all.
I figured out a work around and fried my brain doing so of course as Vision 1.1 simulator has a broken web inspector. force play upon xr session. visionOS detected as Ipad or 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);
}
}
I tried this but am still seeing the video pausing, even though I can see that console.log(video.paused) is false after calling this.video.play(). Do you have a full example you could share? Did you play() the video element when creating it? Thanks for any help!
You just do it in the callback of the sessionstart event. I might make a bug ticket about this one. I already have one regards to web inspect being broken and webxr flags not being enabled. These is even a new bug where it refuses to clear cache, the simulator shouldnt be caching at all.
This “transient-pointer” inputsource updates targetRaySpace like the grip controller so can be raycasted like the grip controller. But each pinch is a connect, selectstart, selectend, disconnect event. So hard to replicate hovering and toggling on objects.
I run all my tests under https to be able to launch webxr from my server on another machine. So try that. I’m trying to get my VR picture in picture hack working for Safari then will release my visionOS changes including transient-pointer controls support.
I’ve not seen any video pause issue but might report it. I think its a webkit bug.
I’ve been working on visionOS non stop for the past 3 weeks. They cost me a week already with fixing all the work arounds and another solid day trying to differentiate visionOS from an Ipad.
Ive been testing XR without problems and now its decided to pause the video again since an OS update requiring more work arounds. It’s literally a feature not a bug lol. It should be reported to webkit though. They do these things intentionally like not enabling webxr by default.
I do however have transient-pointer inputsource controls working now, it took a week or so tinkering with it. so I have a VR controlbar to toggle play. one pinch to toggle to show the controlbar and another pinch for selections. it basically works the same as the grip controller raycaster and select events but you dont add grip controls and you do selections and raycasting on selectend events and on move events. releasing pinch disconnects the controls.
Incredibly unproductive and insane working with anything Apple, it takes up too much time to support implementing hacks and work arounds. The visionOS showing up as Ipad has to be next level next to Iphone still refusing to support html fullscreen requiring a hack to show webgl canvas as native fullscreen. I figured out a way to determine between the two as visionOS shouldnt be given mobile device orientation controls.
It required checking for visionOS instead of iOS as I had to change feature detection to not give visionOS orientation controls. So it looks like this now. I can get video force playing back.
visionOS 1.1 has a webinspect bug I reported. Completely broken and sent live broken. Cant clear caches requiring to rename files to get the updates. It made it very hard to do stuff. To get console logging to even see what is going on with the video requires this websocket proxy script I built and include into the page.
I’ve finally set it live to show video playback working going to XR. the transient-pointer controls should work also by pinching to toggle the control bar for further playback control. It took me weeks to get to this point.
my pip feature and the iphone fullscreen hack is now working again on Safari. As long as visionOS detection doesnt break using the code I figured out above it should keep working. They may do something intentionally to try and break that as that is what they do, sabotage.
absolutely soul destroying trying to work with anything Apple, and said features dont always keep working. Requires extensive testing on all device options now as each work different. Iphone has its own fullscreen hack function to show canvas as native fullscreen, visionOS cant be detected as Ipad and mobile device to turn off orientation controls when going fullscreen, Ipad supports html fullscreen and pip needs testing there etc.
Is there any further advice for this?. We have tried the approach mentioned above and this is still happening. We are forcing the video to play on user command, but getting permissions issue or simply the video doesn’t play.
try my demo page and you can see it working, including transient-pointer input source controller support. Clearly its a bug but havent had time to report it to webkit. Perhaps report it ?
In our case, we don’t need to do the detection as we are only deploying to vision OS. I am able to force the video to play. However, the texture is still not presenting the video. I’m also trying to force ‘needsupdate’ in the render loop without results. Do you have any suggestion for that?